I have a problem to create a silent installer for Outlook Add-In developed using VSTO in C#. The installer is a outlookaddin.vsto generated by clickOnce. This add-in will be published by SCCM in several computers and I need a that the installation be silently but when the package reaches to the final device appear the screen of "Microsoft Office Customization Installer" asking confirmation for install it.
I need create a script with some kind of "autoclick" for clicking automatically on "Install" and "Close" buttons or create a different installer of vsto.
I tried the following methods:
Create script .bat with the following structure:
START C:\Windows\ccmcache\3m\Files\setup.exe setup /S /V"/qn"
Whit this method only the installer is executed as if click on it.
Create a .exe and .msi with "Visual Studio Installer Project". With this
tool only the installation files were copied in "C:\Programs files" but the
add-in is not loaded in outlook.
I made a class in the project for create a custom installer following this
guide of Microdoft:
https://learn.microsoft.com/en-us/visualstudio/deployment/walkthrough-creating-a-custom-installer-for-a-clickonce-application?view=vs-2015
This method not work, when run throws this error: "Could not download
manifest. Error: Value does not fall within the expected range".
I downloaded Advanced Installer 15.9 and created a msi installer. This was the better option until now but when open outlook the first time after install it, appear again the screen of installation, in this case if I clicking on Don't install the add-in follow in outlook but disabled and if I want to enable it, appear the installation screen again.
I add the image of the installation screen.
VSTO installer
You may try this approach:
on a test machine install your current MSI setup, open Outlook and click on [Install] button; this operation will create some registry entries to security inclusion list under the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\VSTO\Security\Inclusion
HKEY_CURRENT_USER\Software\Microsoft\VSTO\SolutionMetadata
export the above registry key and import into "Registry" page of your Advanced Installer setup project; rebuild MSI; install MSI
Related
I am developing an excel add-in in c#.
I had created MSI package for installation using InstallShield limited edition.
During this package creation, I have to add files (.vsto and setup.exe) and "Application Files" folder from published folder in 3rd step (Application files) and in the last step of this process I choose to launch an application and gave the path to the setup.exe file.
I have to do the last step otherwise, it doesn't install as excel add-in and won't show in add-ins menu.
The real problem for me is I have to uninstall both "the MSI package" and "VSTO" but I want to make it single click uninstall. when the MSI package uninstalled, it will automatically uninstall the .vsto.
if we can do this uninstall process manually using some kind of c# scripting code will also helpful. How can I perform sequential uninstallation?
I was able to create msi installed for my c# outlook addin using visual studio installer - an extension.
This is the link I used - https://msdn.microsoft.com/en-us/library/cc766795.aspx.
I successfully created addin using the above link but its not showing up in outlook because the above link didnt talk about registry keys.
So, I added registry keys based on the link - https://msdn.microsoft.com/en-us/library/cc442767.aspx
I changed "installdir" to "targetdir" because visual studio installed had set the property as targetdir where installdir property is if we build using installshield.
So, even thats pointing to correct install dir and addin is loading in outlook. But it is giving error because, at first, I tried with
file:///[TARGETDIR]abc.vsto|vstolocal where abc is my product name.
But abc.vsto is not there ( I selected "primary output" while adding project output to application folder), so outlook complaining that.
Then I tried with file:///[targetdir]abc.dll which gave me error:
Exception reading manifest from file:///path/to/setup/abc.dll:
manifest may not be valid or the file could not be opened
Make sure that you did all the steps described in the Deploying an Office Solution by Using Windows Installer article in MSDN. In general, you may also find the Deploying an Office Solution section helpful.
I developed Excel addin. I want to deploy addin it through ClickOnce. Addin publish to a Shared folder. Addin is developed successfully and appears in Excel. but when I change something in Adin and publish an updated version when you start Excel the following error:
The customization cannot be installed because another version is
currently installed and cannot be upgraded from this location. To
install this version of the customization, first use Add or Remove
Programs to uninstall this program: PricelistExcelAddIn. Then install
the new customization from the following location:
file:///C:/Users/sribin/Documents/Visual Studio
2008/Projects/PricelistExcelAddIn/PricelistExcelAddIn/bin/Debug/PricelistExcelAddIn.vsto
Details:
Name:
From: file:///C:/Users/sribin/Documents/Visual Studio
2008/Projects/PricelistExcelAddIn/PricelistExcelAddIn/bin/Debug/PricelistExcelAddIn.vsto
***** Exception Text *******
Microsoft.VisualStudio.Tools.Applications.Deployment.AddInAlreadyInstalledException:
The customization cannot be installed because another version is
currently installed and cannot be upgraded from this location. To
install this version of the customization, first use Add or Remove
Programs to uninstall this program: PricelistExcelAddIn. Then install
the new customization from the following location:
file:///C:/Users/sribin/Documents/Visual Studio
2008/Projects/PricelistExcelAddIn/PricelistExcelAddIn/bin/Debug/PricelistExcelAddIn.vsto
в
Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.VerifySolutionCodebaseIsUnchanged(Uri
uri, String subscriptionId, Boolean previouslyInstalled) в
Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
How can I fix this problem?
The installation URL of a ClickOnce deployment is a major piece of the identity. You can't install a C/O app from two different locations, and you can't install it from a location that doesn't match the installation URL in the deployment. Having said that, what is your installation URL for your VSTO addin? Surely it's not "c:/users/sribin/documents/visual studio 2008/projects..."
Create a file share somewhere, even if it's on your own machine for testing, and use that as your installation URL, and put the files there.
I've written an Outlook add-in for our office that I'd like to make available to others for testing.
My Googling has indicated that I should make an InstallShield project in the solution and use that, however my Visual Studio install only opens an InstallShield download page for which there is a dead link.
Following this failure, I attempted to manually add the add-in to Outlook by utilizing the files in the bin directory, but it tells me that it is an invalid add-in.
I'm at a bit of a loss here on how to proceed in making this add-in available for distribution.
You could use click-once, right click the outlook project in solution explorer and select publish and follow the wizard. The only problem would be that you will need to sign the click-once app because office addins are particular about security.
This question has further details.
I am trying to change the icon of msi installer package. I didnt found any solution for that. Also i tried to change user interface of msi installer package. I got some skins for that interface,but that is trail version.. Any one knows please help me regarding the above question.
The icon is the standard icon for .msi files. You can´t modify it from within the Setup Project in Visual Studio 2008. The screens used in the Setup Project can´t be modified either from within Visual Studio 2008. The best bet would probably be to look at other 3rd part providers. One example is the Skin Crafter Installer. You can also use Wix and create your customized dialogs yourself.
You can use Visual Studio to change the setup.exe icon. Take the following steps.
Build your setup project
Open the setup.exe file use just
build, File -> Open -> File
Right click the Icon node in the
file explorer window and you can change and save.
As easy solution is to convert the msi to an exe using a program such as "Msi to Exe Converter". The trial does not allow to change the icon. To change the icon use Visual studio. Open the exe as a file and delete the current icon resource. Then add an icon resource by importing the icon you want. Save and done.