How to create uninstaller in visual studio setup project? - visual-studio-2005

I have created a visual studio setup project, but I don't know how to create uninstaller in my visual studio setup project, please tell me how to do that??
I am using Visual Studio 2005, Or is there any other software which creates complete setups with uninstaller.

I have created a visual studio setup project, but I don't know how to create uninstaller in my visual studio setup project, please tell me how to do that??
Kazar's answer is correct. The Visual Studio setup creates a .msi file that describes the installation in a database table. .msi files are consumed by the Windows Installer engine msiexec.exe (much like .docx consumed by Word). If the application is already installed, then the unistall/modify/repair options are presented.
I am using Visual Studio 2005, Or is there any other software which creates complete setups with uninstaller.
There are free and commercial products available. There are two general types of installations for Windows: Windows Installer (.msi) files and script-based installers.

The msi file generated by visual studio setup projects is already both an installer and an uninstaller - run the msi setup file to install it, and then right-click on it to see the uninstall option.

Your installed program will be shown in Control Panel > Add/Remove Programs. You will be able to just hit the "Remove" button there to uninstall your app.
MSI that VS has generated for you is a standard Microsoft installer package, that you can use to install/uninstall software. You can also run admin/silent installations etc, depending on custom command line parameters if you want.

Quickest and easy solution can be found here:
http://tech.chitgoks.com/2009/02/06/visual-studio-create-an-uninstaller-shortcut-in-your-installer-wizard/

if you know where the files were placed and what registry keys were set, you can delete and fix the registry,create an uninstaller program and bundle it with the program in question
the best way would to be to have a generic uninstaller program that takes config files

Related

Visual Studio Installer 2019 Community 16.9 crash

During update Visual Studio 2019 to latest version (16.9), setup failed. Stupidly I closed installer window without read the error.
When I retryed the update, the Installer crashes few seconds after start.
I have uninstalled wholly Visual Studio, but Installer still crash.
I think something is left dirty after first update fail, I tried to search in log files recoverd by collect.exe tools, but I can't found usefull information in that bilions of messages.
Reinstalling Windows must be the last choice, there is a way to take crash error for undertand the problem and search for a solution?
EDIT
Also InstallCleanup.exe don't solve the problem
Visual Studio Installer version 2.9.3349 has problems with culture "it-IT". If that's your case (as it is mine), there is a workaround here:
https://developercommunity.visualstudio.com/t/Visual-Studio-Installer-crashes-after-up/1356122
The workaround is to force a working locale: ./vs_installer.exe --locale en-US
If you think your install and/or installer is corrupted, run the installation cleaner tool available at the URL below and then re-download the latest installer, from which you can get 16.9.
https://learn.microsoft.com/en-us/visualstudio/install/remove-visual-studio?view=vs-2019
Additionally there is a step you can try in Troubleshooting Installation Issues, specifically Step 4 (The advice above the break is actually Step 6 in this process)
Step 4 - Delete the Visual Studio Installer directory to fix upgrade problems
The Visual Studio Installer bootstrapper is a minimal light-weight executable that installs the rest of the Visual Studio Installer. Deleting Visual Studio Installer files and then rerunning the bootstrapper might solve some update failures.
Note
Performing the following actions reinstalls the Visual Studio Installer files and resets the installation metadata.
Close the Visual Studio Installer.
Delete the Visual Studio Installer directory. Typically, the directory is C:\Program Files (x86)\Microsoft Visual Studio\Installer.
Run the Visual Studio Installer bootstrapper. You might find the bootstrapper in your Downloads folder with a file name that follows a vs_[Visual Studio edition]__*.exe pattern. If you don't find that application, you can download the bootstrapper by going to the Visual Studio downloads page and clicking Download for your edition of Visual Studio. Then, run the executable to reset your installation metadata.
Try to install or update Visual Studio again. If the Installer continues to fail, go to the next step.
You have to download the installer again for the offline installation eg.vs_enterprise.exe then run vs_enterprise.exe --layout "folder where you have the offline installation". The new installer needs to download a different new configuration file vs_installer.version.json
https://learn.microsoft.com/en-us/visualstudio/install/create-an-offline-installation-of-visual-studio?view=vs-2019

Installer for Visual Studio 2010

I need to create a setup for installing my project. I meant to try both WIX both native visual studio installer, but i don't know how, when i go to new project there isn't such option. I figured out that WIX don't add templates on 2010, but why there isn't one for visual studio installer?
I would also like to know if there are any other simple installers worth trouble?
Visual Studio 2010 was the last version to support Visual Studio Installer (.vdproj) projects. Many teams use WiX Toolset instead. [UPDATE: There is now a VS extension that provides Visual Studio Installer support to later versions.]
WiX Toolset is a Visual Studio extension. Express versions don't allow extensions so that might be a reason you don't see templates. Another reason is that for the WiX installer to register templates, Visual Studio 2010 must be installed first. You can try repairing the WiX installation.
Another IDE for WiX is SharpDevelop. (It's free.)
Both Visual Studio Installer and WiX Toolset create Windows Installer packages. It's important to understand what Windows Installer does. If you are trying them to compare them, you might be interested in this related question.
NSIS is another technology entirely. It gives complete control over what's put the target system, including whether to have an uninstaller at all. Many projects use it as a bundler for Windows Installer packages. (But, note that WiX now has a bundler [called burn].)

Create setup for application

I want to create setup for my application and I want to know the differences and advantages of creating setup with Visual Studio Installer and InstallShield LE. Which of these is better?
I use visual studio 2010.
See Choosing a Windows Installer Deployment Tool for a comparison of features.
The page also cautions that Visual Studio Installer project templates will not be included in future versions.

Installing Visual Studio Extension (VSIX) with NSIS

I'm building my own extension for VS2010 and it has to be deployed outside of Visual Studio Gallery. My NSIS installer does a very good job in installing other parts of software, however I can't figure out how to install .vsix extension.
I tried doing that via VsixInstaller.exe which is a part of Visual Studio, however it does not allow to silently install an extension for any VIsual Studio found on the machine and get a proper error code into the installer.
"VsixInstaller.exe /quiet extension.vsix" returns 0 error code no matter what happens and requires /skuName and /skuVersion which is not trivial to detect automatically.
Can I somehow do that manually? ReSharper for example keeps all the extension binaries in it's "Program Files" folder and somehow makes them available for VIsual Studio.
Have you tried using copy aka:
copy xx.vsix "%APPDATA%\Microsoft\VisualStudio\10.0\Extensions"
or
copy xx.vsix %ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft"
Registering Visual Studio extensions is complicated process. For pre 2010 VS editions you need to copy appropriate files (.dll/.zip template/.regpkg...) into some folder and then write keys into registry with paths, settings, etc. (many, many keys).
These keys/settings are based on extension you are developing (LanguageService, Package, Add-in, ...)
After 2010 VS editions have new feature - .vsix extensions which is simple .zip archive containing all required files and registry keys.
You need to copy this .vsix file into some folder (recommended is inside VS install directory or other known folder as %VSInstallDir%\\) and then setup VS to load it (like running devenv.com /setup)
Read this blog for more info about discovering VS extensions: http://blogs.msdn.com/b/visualstudio/archive/2010/02/19/how-vsix-extensions-are-discovered-and-loaded-in-vs-2010.aspx

Which one to use, Visual Studio Installer or Inno Setup?

I asked some questions about Inno Setup and .NET Framework installation. Now I am thinking whether is it better to use Visual Studio Installer or Inno Setup?
Which of the two do you think is better and more functional for this type of problem, and in general which is better to use for installer creation?
In general, Inno Setup is easier and more reliable, but if you must ship an MSI, use Visual Studio. See here for installing .NET with Inno.
Visual Studio Installer is retiring in 2010 so for future use it is not suitable. Also there is a tool called InstallShied Limited Edition in VS 2010 for creating installers (based on some other technology).
If you want to create installers directly in Visual Studio try this extension called Visual & Installer: http://visualstudiogallery.msdn.microsoft.com/5e57fe9a-ae5d-4740-a1c3-7a8e278e105b
It supports Inno Setup and NSIS (Nullsoft Installer, both are free and open sourced) and VS 2012 and VS 2012 are already supported so it looks fine.

Resources