The two guids that are "truly" randomly generated are the package and
product guids. The component guid is intended to be deterministic and so is
the result of an algorithm. The switch in heat says "automatically
generated". It doesn't say "random".

It is possible for two different paths to produce the same hash (and thus
the same guid) which would lead to the error that little.forest mentions,
but it would be extremely difficult (nigh impossible) to do on purpose with
any realistic data.

Since the hash is based on the path that makes up the component's identity,
it was deemed sufficiently stable to work. Since changing the name of the
keypath file or moving a component's directory makes it a "different"
component, the fact that the guid would then change was then considered a
"good thing". Autogenerating guids is limited to components that meet a
certain mold (no more than one file, that file must be the keypath, etc.) in
order to minimize the bad effects of a component changing identities.

As a result, if you use auto-generated component guids, you should change
your registry registration (CLSID/ProgId/etc.) that accompanies a file if
you change the filename and/or directory, to prevent the uninstall phase of
a major upgrade from wiping out your component's registration data.

-----Original Message-----
From: Daniel Hughes [mailto:daniel.hug...@tait.co.nz] 
Sent: Tuesday, October 20, 2009 5:48 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Heat and GUIDs

Thanks Blair, I think that answers my question.

What you are saying implies that there is no random component to the 
GUID generation, So it is not randomly generated (as is the case with 
standard guid generation) at compile time but is worked out at compile 
time based on stuff that shouldn't change much.

Cheers,
Daniel

Blair wrote:
> When a component's guid is authored as "*" it uses an algorithm that
hashes
> the keypath including directory path up to the last "well-known"
> folder/property name. That results in extremely stable component guids as
> long as you don't move the guid into a different directory path or change
> the name of its keypath.
>
> I don't know why you would get a different value for any of your
components
> based on the box it is built on. That would appear to be a bug. The
> algorithm (including the hash methodology) is supposed to be stable
without
> any box-to-box differences.
>
> -----Original Message-----
> From: little.forest [mailto:little.for...@ymail.com] 
> Sent: Tuesday, October 20, 2009 4:20 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] Heat and GUIDs
>
> I also run into a GUID and "*" related issue:
>
> I have all of the components use * as the GUID. For one specific
component,
> however, I always get an "xxx component has a duplicate GUID: {...}" when
I
> use Visual Studio 2008 to compile it. I'll have to give it an actual GUID,
> then it compiles okay. Interestingly, in our build server, we don't have
> this problem(we use command line compiler in build server). Is there any
> chance that Wix for Visual Studio 2008 has a bug regarding this GUID
> generation?
>
>
>
> ________________________________
> From: Daniel Hughes <daniel.hug...@tait.co.nz>
> To: General discussion for Windows Installer XML toolset.
> <wix-users@lists.sourceforge.net>
> Sent: Tuesday, October 20, 2009 4:05:13 PM
> Subject: Re: [WiX-users] Heat and GUIDs
>
> the help about -ag says: "autogenerate component guids at compile time"
>
> I assumed this would mean that each time it is compiled a new guid was 
> generated.
>
> If in fact the guid is static as you say, it must be recorded somewhere 
> (all the file has in it is "*"), ie wix would have to know what guid was 
> used for that component last time we created an installer and reuse it. 
> My question is how would it know? or more simply where is the guid
recorded?
>
> Brian Rogers wrote:
>   
>> Hey Daniel,
>>
>> Are you sure you are getting NEW GUIDs when using the "*" (-ag switch in
>> heat.exe)? These should actually be static.
>>
>> Thanks,
>>
>> Brian Rogers
>> "Intelligence removes complexity." - Me
>> http://blogs.msdn.com/icumove <-- NEW
>>
>>
>> On Tue, Oct 20, 2009 at 2:47 PM, Daniel Hughes
>>     
> <daniel.hug...@tait.co.nz>wrote:
>   
>>  
>>     
>>> If I use heat to harvest the contents of a folder, I can set it to
>>> either generated GUIDs then or at compile time, or by default to put in
>>> place holders.
>>>
>>> However if I set it to generate GUIDs then, I will get a different GUID
>>> each time I run HEAT.
>>>
>>> If I set it to generate GUIDs at compile time I will get a different
>>> GUID each time I build my installer.
>>>
>>> My question is,  do my components need to have the same GUID in each
>>> installer a produce. If so does this mean that HEAT is a tool which I
>>> can only use once to harvest the XML and then from then on I must edit
>>> it manually (so I don't lose the GUIDs).
>>>
>>> Cheers,
>>> Daniel
>>>
>>> =======================================================================
>>> This email, including any attachments, is only for the intended
>>> addressee.  It is subject to copyright, is confidential and may be
>>> the subject of legal or other privilege, none of which is waived or
>>> lost by reason of this transmission.
>>> If the receiver is not the intended addressee, please accept our
>>> apologies, notify us by return, delete all copies and perform no
>>> other act on the email.
>>> Unfortunately, we cannot warrant that the email has not been
>>>  altered or corrupted during transmission.
>>> =======================================================================
>>>
>>>
>>>
>>>
>>>       
>
----------------------------------------------------------------------------
> --
>   
>>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>> is the only developer event you need to attend this year. Jumpstart your
>>> developing skills, take BlackBerry mobile applications to market and
stay
>>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>>> http://p.sf.net/sfu/devconference
>>> _______________________________________________
>>> WiX-users mailing list
>>> WiX-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>>
>>>    
>>>       
>
----------------------------------------------------------------------------
> --
>   
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay

>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> WiX-users mailing list
>> WiX-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
>>  
>>     
>
>
> =======================================================================
> This email, including any attachments, is only for the intended
> addressee.  It is subject to copyright, is confidential and may be
> the subject of legal or other privilege, none of which is waived or
> lost by reason of this transmission.
> If the receiver is not the intended addressee, please accept our
> apologies, notify us by return, delete all copies and perform no
> other act on the email.
> Unfortunately, we cannot warrant that the email has not been
> altered or corrupted during transmission.
> =======================================================================
>
>
>
----------------------------------------------------------------------------
> --
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
>
>       __________________________________________________________________
> The new Internet ExplorerR 8 - Faster, safer, easier.  Optimized for
Yahoo!
> Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/
>
----------------------------------------------------------------------------
> --
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
>
----------------------------------------------------------------------------
--
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>   


=======================================================================
This email, including any attachments, is only for the intended
addressee.  It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
 altered or corrupted during transmission.
=======================================================================


----------------------------------------------------------------------------
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to