How can i uninstall multiple programs using single uninstall? (Sequential uninstall) - c#

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?

Related

pack msi into setup.exe

I am creating an installer for a WPF .NET 5.0 project using the 'Visual Studio Installer Projects' extension.
My output after building is an appName.msi file and a setup.exe file that installs prerequisites followed by the msi file.
Having two separate files is not an acceptable solution since the user will not be able to choose the correct file to click on.
How can I make a setup.exe file that includes the msi file (msi packed into the exe) with Visual Studio Installer Projects?
Or if there is any other solution that ends up with a single file for installation that would also be fine.

How to create silent installer for Office AddIn

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

add mobile software exe in my msi file and need to run before my msi file run on client system

I have made msi file of my project using setup and deployment option from visual studio.I want to add one exe file of mobile software in my setup folder and i want ,that mobile software exe should be run before my msi file from my setup folder.I don't know that how i give the path of that software exe and run from my setup folder.
I have used prerequisites option and also add file in my application folder while making setup,but i don't get any solution of my problem.
Please help me.
A prerequisite is the correct solution. Visual Studio setup projects do not support custom prerequisite creation. However, it can be done by manually generating the required manifests.
You can find the manifests structure here: http://msdn.microsoft.com/en-us/library/ms229223(VS.80).aspx
These manifests can be generated automatically with the Bootstrapper Manifest Generator tool.
After generating the package manifests, you can add all these files (including the package) in a separate folder in the Visual Studio prerequisites folder, for example:
C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages
You can then select the prerequisite in your setup project property pages.

Is there any point to the setup.exe file created by a setup project in Visual Studio?

I've created my first setup project using Visual Studio 2010. I've noticed that when I build the setup project it generates an MSI installer file and a setup.exe executable. However, I seem to be able to just right click on the MSI file and choose install to install my application rather than running setup.exe.
Does the setup.exe file that is generated do anything other than just fire up the MSI file? When distributing my application can I just provide the MSI file rather than the MSI file and the setup.exe file?
Kristopher Johnson is correct about the older machines, but it also does something else. When you are setting up the installer you can set dependencies and locations to download those dependencies. The Setup.exe does those dependency checks and launches the other MSI files in to install them. This is most often used to make sure Windows has the correct version of .NET or the C++ runtime installed.
If you do not have dependencies and you can guarantee .NET or the C++ runtime is installed then you do not need to distribute the setup.exe file.
Many (most?) users are accustomed to running the "SETUP" program to install something. That's why it's there. It's a good idea to provide it, unless you are certain that only technically knowledgeable users will be installing your application.
SETUP.EXE is also useful if somebody tries to install on an older version of Windows which doesn't have support for MSI files. In that case, it displays some sort of "You cannot install this program on this version of Windows" error message.
I believe (but could be mistaken) that it performs boot-strapping of the correct version of MSI.

Running another program from c# setup project

I have made a setup and deployment project in C#, Now i have another windows update exe which i want to run and install successfully before it installs my project. I've packaged the exe with my project. How may i run that exe before?
You want to add a Custom Action to the Setup Project that runs the executable. This WalkThrough will take you through getting htat working.
http://msdn.microsoft.com/en-us/library/d9k65z2d(VS.80).aspx
Any other package that should be installed before your own MSI file must be installed by the setup bootstrapper (i.e. the setup.exe file). In order to do so, you should right-click on your setup project, select properties and then pre-requisites. The dialog will list you the components which can be installed by the bootstrapper.
Now, if the component you want to install is in this list, you are done. Otherwise you have to dig deeper into the mechanism of the bootstrapper. Every item in the list has an associated package description stored under
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages
for VS 2005 or
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages
for VS 2008. This package definition basically contains instructions on what to install, how to obtain the component (download url) and how to check whether an installation is necessary.
For custom components you can create your own package definition. If you don't want to do it manually, you can use the Bootstrapper Manifest Generator.
EDIT: If you don't want to go the rather complex but powerful way using the boostrapper you might want to have a look at IExpress. This is a free tool included with MS Windows that allows you to create a self-extracting installation package consisting of multiple components and executing a custom script. IExpress has a graphical UI, but also have a look at the created .sed file for further options.

Categories