views:

35

answers:

1

My understanding is that MSI installers use a file reference count to keep track of how many 'installers' installed a shared file (say a dll). [HKEY_LOCAL_MACHINE]\SOFTWARE\Microsoft\Windows\Current Version\SharedDLLs

This way, say 3 products all install the same DLL, the refcount is at 3. When you run the uninstaller for one of the products, the uninstaller reduces the refcount to 2, but does not actually remove the file.

I am using a non-standard installer that will drop in a couple of files that are also installed by a regular installer. I was wondering if there is an easy way to programatically increment/decrement the file counter for those files? Is there a Windows SDK to do this?

This article talks about the concept but doesn't go into detail of how to implement it: http://msdn.microsoft.com/en-us/library/ms954376.aspx

Thanks in advance for any help!

A: 

The method you describe ("SharedDLLs" Registry key) has been deprecated and replaced by side-by-side assemblies, Microsoft's solution to "DLL hell".

Consider using a SxS assembly:
Assemblies

William Leara