I believe it uses an algorithm to generate the GUID based on the KeyPath, but 
that's just from memory.

--
John Merryweather Cooper
Senior Software Engineer | Integration Development Group | Continuing 
Development
Jack Henry & Associates, Inc.® | Lenexa, KS  66214 | Ext:  431050 
|jocoo...@jackhenry.com



-----Original Message-----
From: Pat Blair [mailto:p...@daburu.net] 
Sent: Sunday, March 29, 2015 9:12 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] How does heat maintain consistent GUIDs?

I am curious to know how WiX keeps track of GUIDSs automatically generated for 
files when we use HeatDirectory.

For example, I have a project with the following in my .wixproj file...

<Target Name="BeforeBuild">
    <PropertyGroup>
      <WixToolPath>C:\SourceControl\WiX39\</WixToolPath>
    </PropertyGroup>
    <HeatDirectory ToolPath="$(WixToolPath)"
                           Directory="C:\users\me\Desktop\SourceFiles

                           ComponentGroupName="MyComponentGroup"
                           DirectoryRefId="INSTALLFOLDER"
                           AutogenerateGuids="true"
                           GenerateGuidsNow="false"
                           SuppressFragments="true"
                           SuppressRootDirectory="true"
                           PreprocessorVariable="var.SourceFilesDir"
                           OutputFile="Components.wxs" />
  </Target>

If I set AutogenerateGuids="true", my output file contains components like
this:

<Component Id="cmpA609F30B9E3AECCDEE4D779C8B7308ED" Guid="*">
                <File Id="fil314398091041DF4762128892E7C98AA7"
KeyPath="yes" Source="$(var.SourceFilesDir)\Sample1.txt" />
            </Component>

I note that Component/@Guid="*".

After generating the .MSI, I open it with Orca and see that the ComponentId for 
each Component (for each file) is the same.

If I change my HeatDirectory element so that AutogenerateGuids="false" and 
GenerateGuidsNow="true", the ComponentIds seem to change.

If I understand correctly, this is how it should work and by using 
AutogenerateGuids, my installers can track a given file from install to 
install.  I also think I understand that the GUIDs will remain the same so long 
as the file names and paths to which they are installed doesn't change, so this 
approach will let me do minor upgrades because the installers can tell that two 
versions of a file from two different installers are the same component because 
the ComponentIDs match.

But what I'm wondering is:  How are these consistent GUIDs that I get when I 
use AutogenerateGuids="true" remembered from build to build?  Are they 
generated by some algorithm that will always produce the same GUID for a file 
with a given name installed to a given directory, or are they stored somewhere. 
 And if they are stored somewhere, where are they stored?

I'm hoping this isn't a dumb question, but I feel like I need to understand 
this before using the feature so I don't make mistakes based on an incomplete 
comprehension of what's happening behind-the-scenes.

Many thanks.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored 
by Intel and developed in partnership with Slashdot Media, is your hub for all 
things parallel software development, from weekly thought leadership blogs to 
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
NOTICE: This electronic mail message and any files transmitted with it are 
intended
exclusively for the individual or entity to which it is addressed. The message, 
together with any attachment, may contain confidential and/or privileged 
information.
Any unauthorized review, use, printing, saving, copying, disclosure or 
distribution 
is strictly prohibited. If you have received this message in error, please 
immediately advise the sender by reply email and delete all copies.


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to