Hi all, This page ( http://wix.tramontana.co.hu/tutorial/com-expression-syntax-miscellanea/formatted-strings ) suggests that [#fileId] can be used in a string to get the path where that file is installed.
However, when I try using them like this... <Component Id='compMyExe' Guid='XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'> <File Id='fileMyExe' Name='my.exe' DiskId='1' Source='my.exe' KeyPath='yes' /> </Component> ... <Component Id='compMyExeConfig' Guid='XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'> <File Id='fileMyExeConfig' Name='MyExeConf.ini' DiskId='1' Source='somePath/'MyExeConf.ini' KeyPath='yes' /> </Component> ... <!-- Sliently install my.exe (with elevated privileges; Execute="deferred", see http://wix.sourceforge.net/manual-wix3/qtexec.htm ) --> <Property Id="cmdInstallMyExe" Value=""[#fileMyExe]" -install '[#fileMyExeConfig]'" /> <CustomAction Id="cmdInstallMyExe" Execute="deferred" BinaryKey="WixCA" DllEntry="CAQuietExec" Return="check" Impersonate="no" /> <InstallExecuteSequence> <Custom Action="cmdInstallMyExe" After="InstallServices" /> </InstallExecuteSequence> ...the install fails with the log output showing... Action 18:27:14: cmdInstallMyExe. MSI (s) (B0:6C) [18:27:14:247]: Executing op: CustomActionSchedule(Action= cmdInstallMyExe,ActionType=3073,Source=BinaryData,Target=CAQuietExec,CustomActionData="[#fileMyExe]" -install '[#fileMyExeConfig]') MSI (s) (B0:E8) [18:27:14:263]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI59E3.tmp, Entrypoint: CAQuietExec MSI (s) (B0:80) [18:27:14:263]: Generating random cookie. MSI (s) (B0:80) [18:27:14:263]: Created Custom Action Server with PID 2020 (0x7E4). MSI (s) (B0:9C) [18:27:14:294]: Running as a service. MSI (s) (B0:9C) [18:27:14:294]: Hello, I'm your 32bit Impersonated custom action server. CAQuietExec: Error 0x80070002: Command failed to execute. CAQuietExec: Error 0x80070002: CAQuietExec Failed CustomAction cmdInstallMyExe returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox) It appears as though WiX or the installer isn't making the substitution at all. I've triple-checked that there are no typos, and that this CustomAction happens after InstallServices, which implicitly comes after the CostInitialize, FileCost and CostFinalize steps, meaning that the fileIds should be referenceable. The install process was working fine before I added the CustomAction-related tags. Anyone have any idea what might be going wrong, and how to fix it? Alain *************************************** Alain Forget, Ph.D. Postdoctoral Researcher CyLab, Carnegie Mellon University afor...@cmu.edu http://cups.cs.cmu.edu/~aforget/ *************************************** ------------------------------------------------------------------------------ Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users