During an upgrade ProcessComponents is setting SharedDlls reference count
to 2 instead of 1, for a component which has a file that was moved from a 
different component (seems like a bug in ProcessComponents, but who knows? 
it's consistent in Win2000 through Win7)  Is there any good way I can avoid 
this?  

Details:
AppV1.MSI has Myfile.inf in component CompA
For legacy support, CompA uses a SharedDlls refcount 
(msidbComponentAttributesSharedDllRefCount) 
 
Unavoidably in AppV2.MSI Myfile.inf has moved to a new component, CompB, 
with new GUID.
(Ideally CompB would also use SharedDlls ref count, but doing so breaks 
the uninstall.)

AppV2 has RemoveExistingProducts (REP) between InstallValidate and 
InstallInitialize.  The upgrade REP correctly removes both Myfile.inf 
and its SharedDlls reference count; after REP there is no refcount in 
the registry.

If CompB has msidbComponentAttributesSharedDllRefCount set, 
ProcessComponents sets the reference count to 2 (imo it should be set to 1) 
so Myfile.inf is not removed when AppV2 is uninstalled.  

Strangely, the MSI log shows:

MSI (s) (98:18): Executing op: 
ComponentRegister(ComponentId={0011E0EC-6D00-1014-BD12-A9DF4A925FCC},KeyPath=C:\Program
 Files\Common Files\MYCO\Common 
Files\Myfile.inf,State=3,,Disk=1,SharedDllRefCount=3,BinaryType=0)
1: {648022DB-6CCE-1014-826D-BCC20F6D7F52} 2: 
{0011E0EC-6D00-1014-BD12-A9DF4A925FCC} 3: C:\Program Files\Common 
Files\MYCO\Common Files\Myfile.inf
- note the odd value "3" for SharedDllRefCount!

Fwiw if CompB does NOT use SharedDlls then the ref count is correctly 
set = 1, but this removes legacy support.

Any ideas for solving this will be very much appreciated! 

Could a custom action written to adjust the reference count be safe? 
The CA would have to run deferred/system to access HKLM, and possibly 
would not know when to decrement the count -- the file could be installed 
by a different product, so a refcount of 2 could be valid.


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to