mhorowitz
Posts: 12
Joined: Sat Jul 26, 2008 7:11 am

merge modules getting removed on update in vista: KB905239

I am experiencing the problem described at http://support.microsoft.com/kb/905238 on Vista. I tried ordering RemoveExistingComponents after InstallFinalize, as suggested in that page as workaround method 2, but after doing an update, most of my product is gone; all that remains is updater.exe and updater.ini. I tried moving RemoveExistingComponents after InstallInitialize as suggested at the bottom of http://msdn.microsoft.com/en-us/library ... S.85).aspx but then the merge modules get uninstalled at upgrade time.

How can I set up my installer so that upgrades on vista work properly?

Thanks.

Marc
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: merge modules getting removed on update in vista: KB905239

Hi Marc,

In the 7.0.1 version of Advanced Installer you can try using the "Install new version first and then uninstall old version" option in the Upgrades page. Please note this works as expected only if the packages use the automated upgrade feature.

If this option doesn't work, can you please give me more details about the behavior you are encountering? Also, please send us the .AIP (project) files of the old and new versions to support at advancedinstaller dot com so we can investigate them.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mhorowitz
Posts: 12
Joined: Sat Jul 26, 2008 7:11 am

Re: merge modules getting removed on update in vista: KB905239

cosmin wrote:In the 7.0.1 version of Advanced Installer you can try using the "Install new version first and then uninstall old version" option in the Upgrades page. Please note this works as expected only if the packages use the automated upgrade feature.
I gave this a try. It broke, but in a different way.
cosmin wrote:If this option doesn't work, can you please give me more details about the behavior you are encountering? Also, please send us the .AIP (project) files of the old and new versions to support at advancedinstaller dot com so we can investigate them.
I have two versions of my installer, 0.8.5 and 0.8.6. Both use a merge module to install the vc90 runtime.

With the original configuration ("Uninstall old version first and then install new version"), on Vista only, if I have 0.8.5 installed, and upgrade to 0.8.6, the vc90 runtime is uninstalled. If I uninstall 0.8.5 first and do a fresh install of 0.8.6, then the vc90 runtime is installed properly. If I do an upgrade on XP, then the vc90 runtime remains installed.

If I alter the 0.8.6 installer to select "Install new version first and then uninstall old version", if I have 0.8.5 installed, and upgrade to 0.8.6, all of my application's files are uninstalled, except for updater.exe and updater.ini. If I uninstall 0.8.5 first and do a fresh install of 0.8.6, everything works fine. This is the behavior on Vista and XP.

I will send the three aip files via email.

Thank you.

Marc
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: merge modules getting removed on update in vista: KB905239

Hi Marc,
With the original configuration ("Uninstall old version first and then install new version"), on Vista only, if I have 0.8.5 installed, and upgrade to 0.8.6, the vc90 runtime is uninstalled.
This behavior is caused by a known bug in Windows Installer. Basically, the new version sees the files as installed, so it doesn't install them again. But the old version uninstalls the files, so in the end the files are missing.
If I alter the 0.8.6 installer to select "Install new version first and then uninstall old version", if I have 0.8.5 installed, and upgrade to 0.8.6, all of my application's files are uninstalled, except for updater.exe and updater.ini.
This happens because the GUIDs of the components in your package are changed from one version to another. The feature works only if the GUIDs remain the same (this lets Windows Installer know that the new package installs the same files). Please modify the GUIDs of the components in the new version to match the components in the old version (you can use the Organization page). This way the upgrade should work as expected.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”