Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio: How to automatically uninstall previous installed version?

I have a simple Web Setup project that reads from a Deployable Project.

Even though I have set the Setup to DetectNewerInstalledVersion to false I always get that annoying alert box that a previous installation exists and I need to go to the Control Panel and find the software to remove it...

Is there a way to add a script in a new new installation Dialog that could say A previous version was found, press NEXT to uninstall it. ?

like image 264
balexandre Avatar asked Sep 07 '11 08:09

balexandre


People also ask

Do I need to uninstall Visual Studio 2017 before installing 2019?

The installation will not attempt to uninstall older versions and we don't need to uninstall older version of VS 2015/2017, before installing the VS2019.

Can I delete Visual Studio installer after installation?

You can run InstallCleanup.exe to remove all installed Visual Studio instances completely. If the answer is the right solution, please click "Accept Answer" and kindly upvote it.


1 Answers

Older versions are uninstalled automatically if you increase your Product Version and change the Package Code. This needs to be done each time you modify the setup project and build a new package.

If you keep the same version and Product Code, older builds cannot be uninstalled automatically. They are detected by Windows Installer before your new package is actually launched. So you need to uninstall them manually.

like image 179
rmrrm Avatar answered Sep 16 '22 11:09

rmrrm