Short answer: [#myDirId] might work. Long answer:
I've done it by setting a property like so for file Ids: <CustomAction Id="Set_MyExeString" Property="MyExeString" Value=""[#myFileExeId]"" /> <CustomAction Id=" MyExeString " Execute="deferred" BinaryKey="WixCA" DllEntry="CAQuietExec" Return="check" Impersonate="no" /> ... <InstallExecuteSequence> <Custom Action=" Set_MyExeString " After="CostFinalize" > </Custom> <Custom Action="MyExeString" After="InstallServices" > </Custom> </InstallExecuteSequence> Alain -----Original Message----- From: George Fleming [mailto:gef...@microsoft.com] Sent: April 3, 2013 20:08 To: wix-users@lists.sourceforge.net Subject: [WiX-users] How do I reference Directory Id's in custom action's exeCommand If I have a Directory tree: <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="$(var.ProgFilesId)"> <Directory Id="AAA" Name="AAA"> <Directory Id="bbb" Name="bbb"> <Directory Id="ccc" Name="ccc" /> </Directory> </Directory> </Directory> </Directory> And a custom action: < CustomAction Id="xxx" Directory="PowershellLocation" ExeCommand="powershell.exe -NoLogo -NonInteractive -WindowStyle Hidden -Command " APS-Cmd -Path Full-path-of-directory-ccc-here"" Execute="deferred" Impersonate="no" Return="check" /> Is there any way to use a variable where I have Full-path-of-directory-ccc-here above? I know you can reference a directory Id in the Directory property, but how about the ExeCommand? I don't want to hard-code the full path if I don't have to. Also, there's a possibility directory "AAA" could be overridden from command-line too. ------------------------------------------------------------------------------ Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users