So your ultimate search for the directory isn't based on a known child folder of VS90_ITEMTEMPLATES_DIR but is instead based on expecting that there will be only ever be one language at a time installed of Visual Studio 2008 (and/or whatever other version of VS you ever support in the future)? And you assume that the text in the file you will install will always match the LCID of the VS you are installing into no matter what LCID that happens to be?
If you determine the LCID of the installation directory you are after (via some simple CA you write) you could extend my "simple" approach: <PropertyRef Id="VS90_ITEMTEMPLATES_DIR"/> <SetProperty Id="PROPCSHARPTEMPLATEPARENTDIR" After="AppSearch" Sequence="both" Value="[VS90_ITEMTEMPLATES_DIR]CSharp\"/> <Custom Action="FindTemplateLCID".../><!--Your simple action that looks for subdirs in the "[PROPCSHARPTEMPLATEPARENTDIR]" folder that "look like an LCID" and sets the TEMPLATELCID property to the result--> <InstallUISequence><Custom Action="FindTemplateLCID" After="AppSearch"/></InstallUISequence> <InstallExecuteSequence><Custom Action="FindTemplateLCID" After="AppSearch"/></InstallExecuteSequence> <SetProperty Id="PROPCSHARPTEMPLATEDIR" After="FindTemplateLCID" Sequence="both" Value="[PROPCSHARPTEMPLATEPARENTDIR][TEMPLATELCID]\"/> -----Original Message----- From: Cody Gibson [mailto:cgib...@artoftest.com] Sent: Tuesday, January 26, 2010 7:04 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] PropertyRef Id="VS90_ITEMTEMPLATES_DIR" I very much appreciate the idea and thoughtfulness of your reply! There's one technical factor you may not be aware of that I think will not fit into your approach (though I love the simplicity of it). The requirement is to install 1 file into the same folder that the Visual Studio file "simpleunittest.zip" is contained in. On an English system, this folder is: [Visual Studio Install folder]\Common7\IDE\ItemTemplates\CSharp\1033 The "CSharp" part of the path is a constant. It will never change. But the 1033 is the LCID for en-us, and it will be different for other language installs. Therefore a filesearch is required in order to discover which folder is the right folder for my installer to place our file into. The definition for VS90_ITEMTEMPLATES_DIR yields this part of the path: [Visual Studio Install folder]\Common7\IDE\ItemTemplates I just need to discover and append a "CSharp\<correct LCID>" to the path. The good news is that the user will never be allowed to override this path. It simply must match where Visual Studio expects to find these particular file types (which are test templates). If the correct path never changed (e.g. was always just "CSharp") I wouldn't bother with a file search and would use straight <Directory> elements in my component definition. Does that shed more light on my problem? Thank you very much, Cody ________________________________________ From: Blair [os...@live.com] Sent: Tuesday, January 26, 2010 5:12 PM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] PropertyRef Id="VS90_ITEMTEMPLATES_DIR" 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 ---------------------------------------------------------------------------- -- 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 ------------------------------------------------------------------------------ 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