您的位置:首页 > 编程语言 > Go语言

InstallShield, Product Codes, Package Codes, and Upgrade Codes, Oh my god!

2011-08-29 15:14 330 查看
So you’ve created an upgrade item with InstallShield (mine is 11.5), you’ve set everything up right as far as you can tell, and when you run in to upgrade a previous version, the installer pops
up the “Modify/Repair/Uninstall” screen of the old version

Aha! You say. Forgot to change the Package code. So a GUID Generate and rebuild later, you try again and this time get this:



You got the Package Code different, Upgrade and Product Code the same in the two versions, and you’ve got a Major Upgrade item setup and configured to recognize the proper Old version number range.

What’s up?

Come to find out, the IS help is a little confused on this topic. When you create a MAJOR UPGRADE to your installation (which, if my experience is any indication, almost EVERY upgrade is a major upgrade), you need to change both the Product
Code and the Package
Code! But here’s the trick, the Upgrade Code stays the same.

Why? Because appearently, a Major Upgrade is considered an entirely new Product, even though it’s not, because you intend it to upgrade older versions of the product.

But MSI doesn’t use the Product Code for that, it uses the Upgrade Code for that purpose.

So, basic rule is:

When you create a new Version of your app’s installation with InstallShield (or any MSI based Installer, I suspect), be sure to:

Make sure you have an Upgrade Item setup to recognize the proper version range

Make sure you generate a NEW PACKAGE CODE guid

Make sure you generate a NEW PRODUCT CODE guid

Make sure you DO NOT modify the UPGRADE CODE guid (basically, you almost never modify the Upgrade Code guid)

Kneel before the holy
altar and make an offering to the MSI gods.

Here’s a handy table from a Macrovision support site article that
also might help. Basically, it illustrates when a particular code needs to be changed (the X’s), based on what kind of upgrade the new version of your install is.
Update TypePackage CodeProduct VersionProduct CodeUpgrade Code
Minor Upgrade without PatchingX
Minor Upgrade with PatchXX
Major UpgradeXXX
You know, I whipped out an install in InnoSetup in,
like, 5 minutes. And it’s free.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: