If you already know the directory you want by name (which your attempt
requires) and you know it is always an immediate subdirectory of the
templates folder (which your attempt also requires) can't you do something
like this?

...
<PropertyRef Id="VS90_ITEMTEMPLATES_DIR"/>
<SetProperty Id="PROPCSHARPTEMPLATEDIR" After="AppSearch" Sequence="both"
Value="[VS90_ITEMTEMPLATES_DIR]CSharp\"/>
...
<Directory Id="PROPCSHARPTEMPLATEDIR">
...

Or even this:

...
<PropertyRef Id="VS90_ITEMTEMPLATES_DIR"/>
...
<Directory Id="VS90_ITEMTEMPLATES_DIR">
<Directory Id="PROPCSHARPTEMPLATEDIR" Name="CSharp">
...
</Directory>
</Directory>
...

The intent should be very clear with both approaches and they are much less
verbose as well. Modify the first above if you allow the
PROPCSHARPTEMPLATEDIR value to be overridden by the user like this (the
second doesn't require any changes):

...
<PropertyRef Id="VS90_ITEMTEMPLATES_DIR"/>
<Property Id="PROPCSHARPTEMPLATEDIR" Secure="yes"/>
<SetProperty Id="PROPCSHARPTEMPLATEDIR" After="AppSearch" Sequence="both"
Value="[VS90_ITEMTEMPLATES_DIR]CSharp\">NOT
PROPCSHARPTEMPLATEDIR</SetProperty>
...
<Directory Id="PROPCSHARPTEMPLATEDIR">
...

Hope this helps,
-Blair

-----Original Message-----
From: Bob Arnson [mailto:b...@joyofsetup.com] 
Sent: Sunday, January 24, 2010 6:14 PM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] PropertyRef Id="VS90_ITEMTEMPLATES_DIR"

On 1/24/2010 1:18 PM, Cody Gibson wrote:
> <DirectorySearch Id="VS90CSharpFolder"
Path="[VS90_ITEMTEMPLATES_DIR]CSharp" Depth="1" AssignToProperty="yes">
>    

The AppSearch action doesn't guarantee an order the table's rows are 
processed, so you can't rely on being able to use the results of one 
search in another. The log has the details:

> Action start 19:23:35: AppSearch.
>
> AppSearch: Property: PROPCSHARPTEMPLATEDIR, Signature: VS90CSharpFolder
>
> MSI (c) (04:80) [19:23:35:651]: Note: 1: 1322 2:
>
> MSI (c) (04:80) [19:23:35:651]: Note: 1: 1322 2:
>
> AppSearch: Property: VS90_ROOT_FOLDER, Signature: SearchForVS90RootPath
>    

It processed the PROPCSHARPTEMPLATEDIR search before the 
VS90_ITEMTEMPLATES_DIR search, so the path is empty -- hence the 1322 
error codes.

-- 
sig://boB
http://joyofsetup.com/


----------------------------------------------------------------------------
--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for
Conference
attendees to learn about information security's most important issues
through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to