3

I have created a Visual Studio setup project. Now it has all the necessary stuff to install on to a computer. The problem is every time I increase the version for the project it installs properly but it does not delete the previous entry in the Control Panel - Add/Remove Program. What should I do to make sure previous version is removed by the installer. I have the RemovePreviousVersion Property set to true. Please help.

2
  • 1
    Are you increasing one of the first three version numbers? Windows Installer ignores the fourth one. Also, do all versions use the same installation type (per user or per machine)?
    – Cosmin
    Feb 25, 2011 at 7:26
  • 1
    Figured it out. To remove previous version you have to keep the same upgrade code. Feb 28, 2011 at 9:26

4 Answers 4

2

Perform a log during the installation of the second product. Use: msiexec /i YourPackage.msi /l*v log.txt

Search for FindRelatedProducts action in order to see if the older version is detected properly.

2

In order your second installation to be an upgrade you should have an UpgradeCode in your property table which would be the same throughout your installers and in Upgrade table there should be an appropriate value matching include lowest/highest version. Some info on upgrade table: https://msdn.microsoft.com/en-us/library/windows/desktop/aa372379(v=vs.85).aspx

1
  • Add more details to you answer. Apr 4, 2016 at 13:16
2

The most common issues in VS upgrades tend to be:

  1. Not following all the rules. This explains them:

https://www.simple-talk.com/dotnet/visual-studio/updates-to-setup-projects/

You must have the same UpgradeCode, different ProductCode and incremented Version, all of which are in the setup project's Property page (NOT the same as "Properties")

  1. The first install was Everyone (or Just me) and the upgrade is not. One will not upgrade the other.
0

You must uninstall your product using your earlier install package. You can do it manually in the control panel, or by rightclicking the install project and selecting uninstall.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.