If I remember the ref counting properly, and looking at the MSI docs for the msidbComponentAttributesSharedDllRefCount bit:
MSI ref counting just works, on components, and I don't know if the OP was thinking of MSI ref counts or the SharedDlls ref counting (which can cause files to remain after an uninstall). If a file is marked as a key file, setting the msidbComponentAttributesSharedDllRefCount bit forces the SharedDlls refcount to be incremented, If it's not set, the SharedDlls ref count will be incremented if there's an existing count there. As a general rule, don't cause this bit to be set unless you know for a fact that this file may be installed with a non-MSI setup that uses SharedDlls ref counting. Clearly you don't want one of these setups to be uninstalled and remove the file. There's a wrinkle if you don't set a file in a component as a key file but set that msidbComponentAttributesSharedDllRefCount in the component. In that case, the folder of the component is the key path for the component, and if you set the msidbComponentAttributesSharedDllRefCount bit you end up with a shared ref count on the folder. So if you're developing and testing installs and these ref counts get set on folders you might get into the situation where the folder and therefore the files it contains cannot be removed because there is a SharedDlls ref count on that folder. This is just another reason to not cause msidbComponentAttributesSharedDllRefCount to be set. Phil Wilson -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Derek Cicerone Sent: Tuesday, June 13, 2006 9:09 AM To: 'Bob Arnson'; 'Peter G. Sakhno' Cc: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Uninstall - questions Its probably good to note that msizap should be used sparingly because it's a bit dangerous - it sometimes goes overboard in what it removes - so you really want to make sure this tool is only used on development machines. Derek -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bob Arnson Sent: Tuesday, June 13, 2006 8:51 AM To: Peter G. Sakhno Cc: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Uninstall - questions Peter G. Sakhno wrote: > Does MSI increments the file's reference count if I install DLL, EXE > and any other files into [*:\Program files\My Product\System] > directory not? > MSI maintains a reference count on every component it installs (except permanent components). That's separate from the SharedDllCount reference count. > How to get rid of previous "broken" installations? > The tool called MsiZap is included in the Platform SDK to remove registration at the per-product level. But it works only on the MSI data, not the actual install. -- sig://boB http://bobs.org _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users