Hi!
Keep product code always the same.
Change package code if You wan't to install different version:
Here are some reading from these codes from Windows Installer help files:
Package Codes
The package code is a GUID identifying a particular Windows Installer package. The package code associates an .msi file with an application or product and can also be used for the verification of sources. The product and package codes are not interchangeable. For details, see Product Codes.
No two nonidentical .msi files should ever have the same package code. It is important to change the package code because it is the primary identifier used by the installer to search for and validate the correct package for a given installation. If a package is changed without changing the package code, the installer may not use the newer package if both are still accessible to the installer.
The package code is stored in the Revision Number Summary Property of the Summary Information Stream. Note that letters in product code and package code GUIDs must be uppercase. Utilities such as GUIDGEN generate GUIDs containing lowercase letters. The lowercase letters in these GUIDs must be changed to uppercase to be used as a product code or package code.
Although it is common to ship an application that has the same package code and product code, the two values can diverge as the application is updated. For example, including a new file with the application would require updating the installation database to install the file. If the changes are minor a developer may choose not to change the product code, however, a different .msi file is needed to install the new file and so the package code must be incremented. Conversely, a single package can be used to install more than one product. For example, the installation of a package without a language transform could install the English version of the application and the installation of the same package with a language transform could install the French version. The transform is distinct from the .msi file that determines the package code. The English and French versions could have different product codes and the same package code because they are both installed with the same .msi file.
Send comments about this topic to Microsoft
***************
Product Codes
The product code is a GUID that is the principal identification of an application or product. For more information, see the ProductCode property. If significant changes are made to a product then the product code should also be changed to reflect this. It is not however a requirement that the product code be changed if the changes to the product are relatively minor.
The 32-bit and 64-bit versions of an application's package must have different product codes. If any 32-bit component of an application is recompiled into a 64-bit component, a new product code must be assigned.
If a server exposed in the PublishComponent Table is recompiled from 32-bits to 64-bits, the GUID in this table may also need to be changed so that 32-bit and 64-bit clients can identify the appropriate qualified component category. In this case, the product code must also be changed.
Note that letters in product code GUIDs must be uppercase. Utilities such as GUIDGEN generate GUIDs containing lowercase letters. The lowercase letters in these GUIDs must be changed to uppercase to be used as a product code or package code. For more information, see Changing the Product Code.
The package code is a GUID identifying a particular Windows Installer package. The package code associates an .msi file with an application or product and can also be used for the verification of sources. The product and package codes are not interchangeable. No two nonidentical .msi files should ever have the same package code. Although it is common to ship an application that has the same package code and product code, the two values can diverge as the application is updated. For more information, see ProductCode.
**********
Send comments about this topic to Microsoft
UpgradeCode Property
The UpgradeCode property is a GUID representing a related set of products. The UpgradeCode is used in the Upgrade Table to search for related versions of the product that are already installed.
This property is used by the RegisterProduct action.
Remarks
It is strongly recommended that authors of installation packages specify an UpgradeCode for their application.
**********
Regards!
Matti
Main Topics
Browse All Topics





by: InvaderPosted on 2009-08-20 at 08:23:38ID: 25143697
Ok since I have no replies yet I am thinking maybe my description is confusing so here is a simple example:
Using InstallShield 10.5:
Lets say I create 2 setups of same product X.
One with version 1.0.2000 and the other with version 1.0.3000
They have the same Upgrade Code but different Package and Product Codes
If I try to install the 1.0.2000 over the 1.0.3000... it will install fine.
I am looking for a way to prevent the older setup of installing over the newer.
Thanks