Hi Ben, Description of DrLocator table (http://msdn.microsoft.com/en-us/library/aa368331.aspx) states that Path column has type AnyPath (http://msdn.microsoft.com/en-us/library/aa367562(VS.85).aspx). Description of AnyPath mentions that path may contain *properties* enclosed in square brackets. Set some property prior to AppSearch action to value you want (either SetProperty or CA Type 51). Remember, that environment variable syntax is [%variable]. Use that variable in DirectorySearch.
Alex -----Original Message----- From: Ben Axelrod [mailto:baxel...@coroware.com] Sent: Thursday, April 30, 2009 2:17 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] User's Environment Variable in DirectorySearch I would like to have a conditional based on the presence of a certain file on the end user's drive. The file is in the user's directory, so I would like to use some environment variables to locate it. This is essentially what I want: <Property Id="FILE_TEST"> <DirectorySearch Id="File_Path" Path=" %HOMEDRIVE%%HOMEPATH%" Depth="0"> <FileSearch Id="File" Name="foo.txt" /> </DirectorySearch> </Property> <Condition Message="This setup requires a certain file"> FILE_TEST </Condition> Which does not work. Note that I am not looking to use pre-processor variables such as $(env.HOMEDRIVE)$(env.HOMEPATH) because then the string would be tied to my user directory, and not the person who is running the installer. Is this possible, or do I have to get this info out of the registry? Thanks, -Ben ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users