cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
DataAnalyzer
Level 8

Upgrade is removing all instead of reinstalling

Jump to solution

I copied an ISM file to a new one and created a new setup program that works fine, and it even updates a prior version it created. However, when it's run against an installation from the legacy ISM file, it's not upgrading it but uninstalling it. The GUIDS for Product code and Upgrade code are identical. When the setup runs, it recognizes that it's already installed and prompts the user to upgrade it. The REINSTALLMODE value is set to "vomus" while REMOVEALLMODE is FALSE which are perfect. However, when looking at the log file, it shows that REMOVE gets set to ALL. Where and how does that happen?

Tracing through the events which aren't running any code, everything is fine through the OnGeneratedMSIScript event. After that, the installation takes over, and after it's done, in the OnInstallFilesActionAfter event, REINSTALLMODE value is blank and REMOVEALLMODE is 1. What caused that and how do I prevent it?

Labels (1)
0 Kudos
(1) Solution
DataAnalyzer
Level 8

The problem seems to be related to two new components we added to our setup program. One added a new registry and another an INI file. We added them to an existing Feature, but that seemed to cause the Update to uninstall the program and not install any files (newer modified files). Not sure why.

We created a new Feature with the two new components. That feature's flag is turned off in OnBegin when the script starts:

FeatureSelectItem (MEDIA, "InstallNew", FALSE);

Then turned on (last parameter is TRUE) for OnFirstUIBefore which only runs for new installations. That fixed the problem.

I don't recall having this issue with other setups in the 20 odd years we've used InstallShield. We've changed settings in Components and Features all the time, but maybe we never noticed it. But in hindsight, this may be why some of our users have to uninstall and reinstall. If that's the case, we'll need to be aware that any new registry or INI file that's added needs to be in its own feature to manage in code. Ugh!

Hopefully someone else knows how to handle this better.

View solution in original post

0 Kudos
(1) Reply
DataAnalyzer
Level 8

The problem seems to be related to two new components we added to our setup program. One added a new registry and another an INI file. We added them to an existing Feature, but that seemed to cause the Update to uninstall the program and not install any files (newer modified files). Not sure why.

We created a new Feature with the two new components. That feature's flag is turned off in OnBegin when the script starts:

FeatureSelectItem (MEDIA, "InstallNew", FALSE);

Then turned on (last parameter is TRUE) for OnFirstUIBefore which only runs for new installations. That fixed the problem.

I don't recall having this issue with other setups in the 20 odd years we've used InstallShield. We've changed settings in Components and Features all the time, but maybe we never noticed it. But in hindsight, this may be why some of our users have to uninstall and reinstall. If that's the case, we'll need to be aware that any new registry or INI file that's added needs to be in its own feature to manage in code. Ugh!

Hopefully someone else knows how to handle this better.

0 Kudos