开发者

Installshield - need to remove Products with "bad" upgrade code

开发者 https://www.devze.com 2023-02-09 06:34 出处:网络
We have an installshield product where we\'ve had the same upgrade开发者_运维技巧 code during the lifetime of the project.Somehow, a release got out with a new Upgrade code, so now we\'re starting to

We have an installshield product where we've had the same upgrade开发者_运维技巧 code during the lifetime of the project. Somehow, a release got out with a new Upgrade code, so now we're starting to see multiple entries in our customers' Add/Remove programs.

Is there a way (install script, perhaps?) to go through and check a product for another Upgrade code and remove it if it doesn't match the current one (we're going to reset it back to the old one and NEVER change it again!)?

Thanks in advance for your time!


An installer can remove Products belonging to any number of UpgradeCode families. Just author another MajorUpgrade rule ( Upgrade table ) to cover both the old and the new UpgradeCode and you should be fine.


Check to see where the application install information is stored in the system registry. If you can find where the product code is stored you can write a script to read the code from the registry and then perform a remove program script.


I just went through this myself, and it was a pain. We use VS 2005 to build our MSI's, and for whatever reason I accidentally changed the Upgrade Code on the last release. This caused the program to show up twice in the Add/Remove programs dialog, despite having the RemovePreviousVersions flag set. I found that I had to edit the Upgrade Table to put in an entry for the rouge Update code.

This process should be easier for you with InstallShield, but I'll include the VS instructions I had to use just in case.

In VS 2005, you don't have access to edit the Upgrade Table (at least I couldn't find it), so I had to install a program called Microsoft Orca (MS has some cool code names, but terrible product names). It comes with the Windows SDK, so I already had it on my computer. Here is the link: http://msdn.microsoft.com/en-us/library/aa370557%28v=vs.85%29.aspx

Open your MSI file in that program and you'll see Upgrade towards the bottom of the list. You have to add a new entry for the Upgrade code you want to deal with. Here's a link that explains it: http://msdn.microsoft.com/en-us/library/aa372379%28VS.85%29.aspx

I made a new row with the Upgrade Code I wanted to remove, with the correct version numbers, with an Attribute of 4 (msidbUpgradeAttributesIgnoreRemoveFailure) and an ActionProperty of PREVIOUSVERSIONSINSTALLED.

If I understand this correctly, I basically told the MSI that in conjunction with the RemovePreviousVersions flag that it would consider this other upgrade code and remove it. It worked in my case, so hopefully some of this will help for you.

Good luck!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号