Search code examples
visual-studio-2008setup-projectuninstallation

Default uninstall functionality of Setup and Deployment Project can't be executed upon rebuild of setup.exe?


I created a setup project to install my application (*.bat file) and successfully installed to end-users' pc. And run the same setup.exe to uninstall the installed application.

Now, I enhanced the application by modifying *.bat file, adding external files, etc..

Then, need to update the setup project to add the newly added external files and things go well and rebuild was done.

The problem is, when I execute the newly rebuild setup.exe on the end-users' pc, uninstall functionality was gone. It only says, old version was installed need to uninstall first via control panel.

Why the uninstall functionality of Setup Project is not longer functioning upon creation of new setup.exe?

Any guidance on the right direction is appreciated.


Solution

  • To upgrade older versions you can try this:

    • select your setup project in Solution Explorer
    • in its Properties pane set RemovePreviousVersions property to True
    • generate a new Product Code
    • increase the Version

    These are the main requirements of a major upgrade.