SharedDllRefCount='yes' is really for occasions when someone has or will be
distributing the file in a different way, i.e. not using Windows Installer.
Windows Installer can reference count the packages that install the
component, there's no need to have the additional overhead of reference
counting the DLL itself. (Windows Installer actually records which packages
have installed a given component and where they installed its key path to.
If, on removing a component, it detects that no packages reference a
particular key path location any more, it removes all of the component's
resources.)

 

For best results, you should ensure that any common files are members of the
same component (i.e. have the same component GUID) in all packages that
distribute them. Further, the component should have the same composition
(exactly the same files, registry keys, shortcuts, etc) in all packages. The
best way to ensure this is to use the same source for the component every
time, and upgrade it carefully. If you need to include this in any non-WiX
Windows Installer package, you'll need a merge module, but for composing
solely WiX packages, it's easier to use a WiX Fragment.

 

If you can't abide by the rules to keep the component compatible (in both a
semantic sense and in its composition) you must change the GUID and change
where it installs to (either its name or the destination directory). If you
don't do this you may suffer the problems described in Rob's blog post
"Component Rules 101" at
http://blogs.msdn.com/robmen/archive/2003/10/18/56497.aspx.

 

The problem with SelfRegCost is that Windows Installer can't detect whether
the registry settings have been modified - because it doesn't know what they
are - so can't repair the component, or at least cannot automatically do so
when launching an advertised shortcut. I don't know whether it will repair
properly if you use the Repair button in Add/Remove Programs (or otherwise
initiate a repair action). There may be other issues that I'm not aware of.

 

-- 

Mike Dimmick

 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Scott Palmer
Sent: 25 January 2007 19:39
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Shared files

 

I have a COM DLL that I want to place in a common place for all products
installed by my company.  E.g. \Program Files\Company Name\Common

For the Component I set SharedDllRefCount="yes".

I'm wondering about the best way to install and how the GUID for the
component is involved.  Do I use the same GUID for this component in all of
the products that I install it?  Is that exactly the wrong thing to do?  Or
does it not even matter so long as the GUID is unique within that MSI file? 

Is it better to create a Merge Module?  IF I only have the one DLL or a very
small number of DLLS and managing the component in separate .wxs files isn't
a problem, is there any benefit to a Merge Module?

Is there a better way to deal with COM DLLs in WiX?  For example COM DLLS
are by definition shared components..  shouldn't there be a warning of some
sort if you set the SelfRegCost and the file is in a component that does not
have SharedDllRefCount="yes" ? 

Btw, I've read the warnings, but I'm not ready to abandon using SelfRegCost.
It's too painful at this point.

Thanks,

Scott

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to