I should have added, the GUIDs under HKLM\....\Components are not in their
original format but in a 'compressed GUID' format. There is information on
how to convert between the formats at
http://support.installshield.com/kb/view.asp?articleid=q105971. Only the
component's key path is listed - any other resources in the component are
not checked.
Windows Installer uses the following rules for installing a component from a
package being installed, depending on what the component's key path is:
Registry key - if the key already exists, the component from the package is
ignored
Registry value - if the value already exists and is what would be set, the
new component is ignored
ODBC Data Source - if it already exists, the new component is ignored
Directory - if it already exists, the new component is ignored
File:
If the file does not exist, the component is installed
If the file on disk has a version number:
- If the file to be installed has a higher version number in the File table,
the component is installed
If the file on disk does not have a version number:
- If the file to be installed has a version number in the file table, the
component is installed
- Otherwise, if the file on disk is not modified (modification date =
creation date):
- If a hash is specified and the hash of the existing file does not match,
or there is no file hash specified, the component is installed
Otherwise, the new component is ignored.
When uninstalling, the reference from the package being uninstalled is
removed. If there are no more packages referencing the same key path, the
component is removed using the definition in the package being uninstalled.
That's why you must not change the makeup of a component.
--
Mike Dimmick
_____
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mike Dimmick
Sent: 09 July 2007 19:14
To: 'Rory Clark'; wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Windows Installer Service and reference counting...
It doesn't. Modules, once merged, lose their own identity. Only packages are
remembered.
Components are referenced, but not really reference counted. Instead,
Windows Installer remembers each product which installed a component and
where it installed it to. The actual format is undocumented and should not
be relied upon; however, if you want to look at it, they're in the registry
under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserD
ata\<sid>\Components. <sid> is the user's security identifier, for per-user
installs; for per-machine installs, it's the well-known SID S-1-5-18 (which
is Local System).
If you're installing the same file to the same location, it should always
have the same component GUID. You should never allow the same resource to
have a different GUID - doing so will break the referencing mechanism. If
you need to make incompatible changes, change the file name and/or install
location and the component GUID. It's fine to install the same component to
more than one location. See Rob's blog post Component Rules 101 at
http://blogs.msdn.com/robmen/archive/2003/10/18/56497.aspx.
If you want common components and don't want to copy and paste the source
into multiple .wxs files, consider the use of WiX fragments (top level tag
<Fragment>). You can compile a fragment into a .wixobj file and share that
between multiple projects by including it on the linker (light) command
line. If you have multiple .wixobj files you want to share around, you can
bind them into a single .wixlib file with the library tool, lit. WiX is
designed like a C++ toolset: compiler (candle), linker (light), library tool
(lit).
--
Mike Dimmick
_____
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rory Clark
Sent: 09 July 2007 19:02
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Windows Installer Service and reference counting...
Where does the installer service store its reference counting data for
modules?
We're trying to preserve the idea of ref counting without merging modules
into an MSI. Yes, we realize there are dangers to this approach, but we are
trying to solve some problems with install, reinstall, and uninstall in our
controlled environment.
Thanks!
Rory
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users