When CostFinalize makes the directory paths, it walks the directory
hierarchy. For each directory identifier that does not already have a
property with a value, it creates a property by appending the appropriate
part of the DefaultDir column value to the path of the parent directory from
the table (appending a "\" char). If there was a property already set, it
ignores the parent directory value and uses the property's value as the
path. Then it canonicalizes the name and sets the associated property.

I have seen MSIs where the CommonFilesFolder directory was in the hierarchy
three levels deep underneath ProductFilesFolder or where ProductMenuFolder
was buried in the hierarchy in some similar fashion and everything seemed to
"just work". I don't recommend such things, but given the above algorithm...

-----Original Message-----
From: Scott Palmer [mailto:swpal...@gmail.com] 
Sent: Wednesday, October 14, 2009 9:00 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Criteria for Automatically Generated Component
GUIDs

Hmm.. interesting...  I would have thought that was going to try to make a
subdirectory in the CommonAppDataFolder, or just not be allowed because the
implied tree structure of the XML elements conflicts.
Thanks,

Scott

On Wed, Oct 14, 2009 at 11:48 AM, Blair <os...@live.com> wrote:

> While it may "feel" backwards in some way, you could try this:
>
>    <PropertyRef Id="WIX_DIR_COMMON_DOCUMENTS"/>
>    <DirectoryRef Id="TARGETDIR">
>       <Directory Id="CommonAppDataFolder">
>         <Directory Id="WIX_DIR_COMMON_DOCUMENTS">
>          <Directory Id="CommonDocs" Name="Company Name">
>            <Directory Id="SharedDocuments" Name="Product Name">
>
> The rational is that TARGETDIR could end up anywhere (and may not be the
> same place on two different invocations of the installer) but
> CommonAppDataFolder and other "well known" locations (the ones that
Windows
> Installer defines) are more stable as to final location. The folders that
> WiX knows about but Windows Installer doesn't (such as
> WIX_DIR_COMMON_DOCUMENTS) aren't in the well-known-location list because
> they may not exist on all platforms.
>
> -----Original Message-----
> From: Scott Palmer [mailto:swpal...@gmail.com]
> Sent: Wednesday, October 14, 2009 7:21 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: [WiX-users] Criteria for Automatically Generated Component GUIDs
>
> What are the exact criteria for getting automatically generated GUIDs to
> work?
>
> I suspect this is related to my use of WIX_DIR_COMMON_DOCUMENTS (since
> there
> doesn't seem to be another way to get to that "standard" directory).
>
> I'm getting this error:
>
> error LGHT0231: The component 'indexComp' has a key file with path
> 'TARGETDIR\company name\product name\subfolders\index.html'.  Since this
> path is not rooted in one of the standard directories (like
> ProgramFilesFolder), this component does not fit the criteria for having
an
> automatically generated guid.  (This error may also occur if a path
> contains
> a likely standard directory such as nesting a directory with name "Common
> Files" under ProgramFilesFolder.)
> My components are in a fragment with a directory structure as follows:
>
>  <Fragment>
>    <PropertyRef Id="WIX_DIR_COMMON_DOCUMENTS"/>
>    <DirectoryRef Id="TARGETDIR">
>      <Directory Id="WIX_DIR_COMMON_DOCUMENTS">
>        <Directory Id="CommonDocs" Name="Company Name">
>          <Directory Id="SharedDocuments" Name="Product Name">
> ...
>
>
> Thanks,
>
> Scott
>
> 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


------------------------------------------------------------------------------
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