View Full Version : Prefent file removal during major upgrade

07-06-2007, 04:24 AM
Hi all,

another issue I have running into.
I created a new major version of my project and configured the major upgrade settings to "Install setup then remove uneeded files".

I also changed the setup Design, I added some new Components and reorganisied others. Some old components have been removed, but the application files are still in other components now.

Now when I upgrade my application, it first installs the new files - all fine. But when it "removes the uneeded files", it does remove all the files from the removed components. But they have been replaced by other components now. I am a bit lost now, how can I prevent InstallShield from doing this - if I can prevent it?

07-06-2007, 09:01 AM
OK I could workaround this problem by setting the "Shared" option of the new components to yes. One of these components does install a Windows NT Service on the key file. Now another problem happens

First case: A clean install of the new setup, everything works fine. Install, Uninstall
Second Case: I install the old version of my product first, the run the major upgrade. The new files are overwritten und are not deleted as before, so far it works. Now I uninstall my application. And it does NOT remove the component which contained the NT Service. Also the NT Service is NOT removed.

The same works if no previous version was installed.

EDIT: I noticed that the entry for my component is left in "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs", count 1. So the question is why is it not correctly decremented during uninstall?

EDIT2: For some reason the count for "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs" is always 2 after the upgrade installation. How can that be?