Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Uninstall is Removing Shared Files


4 replies to this topic

bilandra

bilandra
  • Full Members
  • 12 posts

Posted 03 September 2011 - 04:53

Hey,

I could really appreciate some advice, if anyone has any to spare. smile.gif

We have an installer that serves as a PRQ in most of our product installers. It is our update service (Product A) that checks for and installs updates for a variety of the products we offer. It contains two files that are shared by Product B.

Upon uninstalling the update installer (Product A), two of those files are removed that are required for Product B to function, leaving Product B inoperable.

Both of these files are included in one merge module, that is used in both the Product A and Product B installers. Under the component properties, each of the files is set to Shared.

So how do I check that the reg entry for each of these files increments with each installation?

And how do I get these two files remain on the computer during uninstallation if they are being used by another program?!?!?!? smile.gif

Thanks, in advance for any help you can offer!!! smile.gif

~Bilandra:)





Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 17 September 2011 - 14:19

Generate a log to see why the installer thinks the file is no longer needed. The shared setting shouldn't even be necessary, it's only reqzuired if the same file is also installed by some non-msi setup (or a setup using a different component ID for the same file, but you correctly avoided this problem by using a merge module)

bilandra2

bilandra2
  • Full Members
  • 5 posts

Posted 18 September 2011 - 22:43

Hey Stephen,

Thanks so much for getting back to me. I did eventually figure out how to log the installation of the 2 products.

I've been trying to figure out what's been going on, and basically, this is what I can gather.

I released Product A with the two shared files in a merge module, and the components were both being installed to:

C:/Program Files/Common Files/My Company/My Product/Share Files /file.exe
C:/Program Files/Common Files/My Company/My Product/Share Files /file.dll

Product B and C used to be separate, and Product B used to contain the same merge module as Product A. It became unneccessary for Product B and C to be separate, and so I combined them into Product C, by basically adding to Product C all of the merge modules that used to exist in Product B. When I did that, I noticed that none of the newly added merge modules from Product B were installing the correct location, so I rebuilt all of them. And they then installed to the proper location.

The problem is that when I rebuilt the merge module that is shared with Product A, I fixed the path of the files for the merge module to:

C:/Program Files/Common Files/My Company/My Product/Shared Files/file.exe
C:/Program Files/Common Files/My Company/My Product/Shared Files/file.dll

Note that I corrected the path and removed the unneccessary space after Shared Files. However, I did NOT change the component GUID. sad.gif And I believe that is where my problem comes from. I also did NOT rebuild the product A installer with the new merge module!!! I know...I know...stupid.

So now, Product A installs the files with Shared Files /, and Product C installs the files with Shared Files/ (no space). And since they have the same component GUID, the ref counts are messed up, which is why when I uninstall Product A, it removes files in use by Product C.

Basically, HKEY_LOCAL_COMPUTER/Software/Microsoft/Windows/CurrentVersion/SharedDLLs looks like this:

C:/Program Files/Common Files/My Company/My Product/Shared Files /file.exe(1)
C:/Program Files/Common Files/My Company/My Product/Shared Files /file.dll (1)
C:/Program Files/Common Files/My Company/My Product/Shared Files/file.exe (2)
C:/Program Files/Common Files/My Company/My Product/Shared Files/file.exe (2)

Because Shared Files /file.exe and Shared Files/file.exe have the same component GUID, when I uninstall, I assume that it's checking the first instance of the comp GUID, and see the reg count as 1, and just uninstalls the files. sad.gif

The log file is like Russian to me, but I was able to discern from it that the installers had the same component GUIDs.

So long story short, I get that I f'ed up, but now I just need to come up with a plan of action to fix it.

And to confuse matters even more, on our website, we have a link to download Product A and Product C installers separately. If I install Product A and Product C individually, instead of installing Product A as a PRQ to Product C, the reg counts are fine and there is no incorrect Shared Files / path!?!?!?! And the product code, package code, everything is the same. It's installing the same exact installers, but when it installs as a downloaded PRQ is the only time I see the incorrect path and ref counts.

Note also, that even when there are ref counts under the Shared Files / path, there is no actual folder installed to the computer named Shared Files /. It is installing the files to Shared Files/.

So I've tried renaming the component GUID, and then fixing the path, but that didn't work to remove the incorrect reg counts. I've tried RemoveRegistry, but haven't really been able to see that it's working. I must have it wrong somehow.

Even if I do a major upgrade, it does not uninstall the Shared Files / entries from the reg count, and it's set to do a complete uninstall before installing the major upgrade.

Thanks for any advice any one can give!!!

~Bilandra:)



bilandra2

bilandra2
  • Full Members
  • 5 posts

Posted 19 September 2011 - 04:03

Sorry Stefan for mispelling your name!!!

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 20 September 2011 - 09:52

Uh oh, the blank at the end of the path might be a problem because Windows automatically removes it.

If it works when installed separately but fails when installed as prq, then please compare the two MSIs (using MsiPackageDiff) to find out what's different. I don't see a reason why the behaviour would be different if the MSIs are identical.