Answered by:
Installer doesnot uninstall previous version

Question
-
User-2087154580 posted
I have a setup project which gives me a .msi file
When I try to install this on a machine which already had installed its earlier version...it gives me an error and asks me to remove it from Add/Remove programs.
I have enabled the RemovePreviousVersions to RemovePreviousVersions=true
What should i do, so that the installer either repairs or uninstalls and reinstalls it automatically?
Please help.
Regards
Amita.
Wednesday, April 1, 2009 6:47 AM
Answers
-
User372121194 posted
Hi,
The installer checks UpgradeCode and ProductCode properties to determine whether the earlier version should be removed. The UpgradeCode must be the same for both versions; the ProductCode must be different.
For more information, see http://msdn.microsoft.com/en-us/library/y63fxdw6%28VS.80%29.aspx
I look forward to receiving your test results.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, April 6, 2009 12:13 AM
All replies
-
User372121194 posted
Hi,
The installer checks UpgradeCode and ProductCode properties to determine whether the earlier version should be removed. The UpgradeCode must be the same for both versions; the ProductCode must be different.
For more information, see http://msdn.microsoft.com/en-us/library/y63fxdw6%28VS.80%29.aspx
I look forward to receiving your test results.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, April 6, 2009 12:13 AM -
User-2087154580 posted
Hi Thomas
Thanks for the solution...it worked out.
Regards
Amita
Wednesday, April 15, 2009 2:07 AM -
User-1381574461 posted
I tried. It did install without promting to remove the previous version.
But when I go back to Control Panel->Add/Remove Programs, I see multiple version of my application are shown there. That is to say, the old versions are still in my PC?
I am using Visual Studio 2005. I did set in my Installer project properties that RemovePreviousVerison to true and increment the version (and change the product code).
Please let me know what went wrong. thanks
Thursday, August 27, 2009 10:01 PM -
User692794875 posted
I also have an issue with msi installer related to the above post.
Somehow I have messed up with the product code and upgrade code in my installer project.
Now I need to make a new setup. I have copied the upgrade code of my previous setup and made a new setup.
But, after the installation I could see two installations in the control panel. Can anybody help me to resolve this issue?
Tuesday, November 17, 2009 11:46 PM -
User692794875 posted
Hi I have a solution now!!
What I have done is , I have extracted the Productcode and Upgradecode from my previous msi file and updated the same in the setup project. Then, I incremented the version property and made a new setup. It worked !!
Thanks everybody !!
Anil Marar
Wednesday, November 18, 2009 6:48 AM