Changing Product Name for Upgrade
InstallShield 2015, BTW
Take the following scenario:
- Version 126.96.36.199Already installed in C:\Program Files (x86)\Company\ProductRegistry entries are created in HKLM\SOFTWARE\WOW6432Node\Company\Product
I need to create an upgrade so that when it does the upgrade, it changes the following:
- Version 188.8.131.52When upgrading, change the install directory to C:\Program Files (x86)\Company\Product2. The old directory should no longer exist on the system.Registry entries should be changed to HKLM\SOFTWARE\WOW6432Node\Company\Product2. Like the directory, the old registry key should no longer exist on the system.
One of the tricky things is that during the initial setup of 184.108.40.206, the user can select some items to install and those options are stored in the registry. When I run the upgrade, I don't want to rerun that prompt and instead simply upgrade any selections they made during the initial installation.
So let's say during the initial installation, they selected item A, B, C for installation, but not D, E, F. The registry would have:
- Version 220.127.116.11:HKLM\...\Product\Items\AHKLM\...\Product\Items\BHKLM\...\Product\Items\C
During the upgrade, I don't want to prompt them again. I just want to upgrade A, B, and C as needed. So I can't just blow away the registry for this application. Instead, I want to rename it so that it looks like:
- Version 18.104.22.168:HKLM\...\Product2\Items\AHKLM\...\Product2\Items\BHKLM\...\Product2\Items\C
So I wondering which of the following options are best and how to do them:
I should also point out that the lead developer is really adamant about not changing the other parts of the version number. Unless I can demonstrate that that would be the only way to get this working, he won't budge.
Any help would be greatly appreciated.
However, even though MSI itself only recognizes the first 3 number segments for it's own upgrade purposes and you have to follow the rules that it enforces - this ONLY applies to the Product Version in the installer itself - it does NOT apply to all of the files that you might include in your installer for delivery onto the target system. Those can be completely different versions than the installer itself. Not sure if maybe that point was lost.
But, yes, what you describe is the way it works. MSI does not recognize any difference between two installers that only vary in the fourth segment of the Product Version. The fourth segment is the "Build" number and Microsoft decided a LONG time ago that one build should not be considered an upgrade to a prior build. Don't ask me "why", it's just the way it is.
Here's the reference on Microsoft's web site - since you obviously are not trusting some information being given
Specifically the section in gray that says.
Note Windows Installer uses only the first three fields of the product version. See ProductVersion Property for descriptions of these fields. If you include a fourth field in your product version, the installer ignores the fourth field.
I use a similar approach with a 64-bit overlay installer - it reads all of the registry keys set by the 32-bit installer and then writes those same values to the 64-bit section of the registry, which the 32-bit installer doesn't have access to.