ProductCode and UpgradeCode confusion - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

bjk68
Posts: 55
Joined: Tue Dec 01, 2009 12:45 pm

ProductCode and UpgradeCode confusion

With little knowledge of Windows Installer we built some test MSI's to take AI for a test drive. All went very well and we created several MSI's for several of our products. During testing we discovered some strange behaviour :? which eventually appeared to be caused by some GUID's that AI never told us about. These are the ProductCode and the UpgradeCode.

We took the same project as a basis for all MSI's. We changed the ProductCode, when we changed the Version, because AI told us so, but we were never triggered to change the UpgradeCode when we changed the Product Name or when we replaced the folders below the APPDIR. :(

We ended up with all MSI's having the same UpgradeCode and two MSI's for different products (but with the same version) having the same ProductCode. :shock:

:idea: It should be more clear in the helpfile how these two GUID's (ProductCode and UpgradeCode) are influencing the behaviour of the Windows Installer. It should be explained when these GUID's need to be unique, and in what circumstances they need to be identical. The Help page of the Project IDs Tab (Project Settings) gives no information at all about the meaning of the ProductCode and the UpgradeCode. The help page "Creating a Profession Package" would be a good place to give some addtional information about the importance of these two GUID's too.

:idea: Also it would be very helpful if AI presented a popup when you change the Product Name, offering to change the UpgradeCode.
Last edited by bjk68 on Mon Dec 14, 2009 5:52 pm, edited 1 time in total.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: ProductCode and UpgradeCode confusion

Hello,

Using the same .aip project file as a basis for multiple installer projects is not recommended. If you do need to use it as a template, then you will have to save it as a template from the "File" menu. Doing so will create new GUIDs each time the template is used as a base for a new project.

We will improve the help in the future to better inform our users about this.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
davidnewcomb
Posts: 19
Joined: Fri Apr 09, 2010 5:04 pm

Re: ProductCode and UpgradeCode confusion

I have just read the help and it is very confusing - which is why I'm in the forum looking for an answer.

Let me see if I've got this:

The ProductCode is fixed for your product so that you can't have more than one of them installed at a time. So Application 1.0 has a different ProductCode than Application 2.0. This has to be true so that patching works for 1.x upwards and 2.x upwards separately.
The UpgradeCode is the same for each version of your product i.e. Application 1.0 and Application 2.0 have the same UpgradeCode. This is so that ProductCode and UpgradeCode can be used together to make sure that an update package is valid.

Is this right? The documentation about UpgradeCode is really confusing.
http://www.advancedinstaller.com/user-g ... ation.html

Then the documentation talks about the Package code. If the user tries to re-install the product again, windows installer checks the PackageCode and if it is the same then it gives the options to Repair,.. If there is no match them your documentation says it errors. This can't be true! If it was true you would never be able to upgrade as the PackageCode is different on every build. Is it used in combination with the UpgradeCode which you have said is the same for everything.

I'm really confused, can someone please clarify why, where and when these numbers are altered and the rules which govern when it knows to update or install.

Thanks,
David.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: ProductCode and UpgradeCode confusion

Hi David,

The ProductCode is fixed for your product so that you can't have more than one of them installed at a time. So Application 1.0 has a different ProductCode than Application 2.0. This has to be true so that patching works for 1.x upwards and 2.x upwards separately.
The UpgradeCode is the same for each version of your product i.e. Application 1.0 and Application 2.0 have the same UpgradeCode. This is so that ProductCode and UpgradeCode can be used together to make sure that an update package is valid.

Is this right? The documentation about UpgradeCode is really confusing.
http://www.advancedinstaller.com/user-g ... ation.html
You've understood correctly.
Then the documentation talks about the Package code. If the user tries to re-install the product again, windows installer checks the PackageCode and if it is the same then it gives the options to Repair,.. If there is no match them your documentation says it errors. This can't be true! If it was true you would never be able to upgrade as the PackageCode is different on every build. Is it used in combination with the UpgradeCode which you have said is the same for everything.
As the documentation sais, the comparison is done only when the ProductCode of the package being checked matches the ProductCode of the package already installed on the computer.
Here is the relevant paragraph "Windows Installer will check the installer's ProductCode to see if the product has been installed on the machine. Since it was, Windows Installer will find it and then check the PackageCode of the installed product." Different versions do not have the same ProductCode so Windows Installer will not compare the Package Codes, thus the check will not fail.

Let me know if this helped.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”