From: Robert O'B. <Rob...@mi...> - 2008-04-09 05:44:45
|
Thanks this helped. That's exactly what was going on here. I was trying use Windows Installer properties in my CAQuietExec command line property values. When I switched to getting rid of those references and using the deferred execution option then these custom actions started working, e.g. <CustomAction Id="SetSystemDriveProperty" Property="SystemDrive" Value="[%SystemDrive]" Execute="firstSequence" /> <CustomAction Id="QtExecCmdLineSet1" Property="QtExecCmdLine" Value=""c:\windows\system32\cmd.exe" /c copy /y c:\diskpart.scr "%temp%\QtExecCmdLineRun1.txt"" /> <CustomAction Id="QtExecCmdLineGet1" Property="QtExecCmdLineDetails1" Value="[QtExecCmdLine]" /> <CustomAction Id="QtExecCmdLineRun1" BinaryKey="WixCA" DllEntry="CAQuietExec" Return="ignore" /> <CustomAction Id="QtExecCmdLineSet2" Property="QtExecCmdLine" Value=""c:\windows\system32\cmd.exe" /c echo f | xcopy.exe /i /y c:\diskpart.scr "%temp%\QtExecCmdLineRun2.txt"" /> <CustomAction Id="QtExecCmdLineGet2" Property="QtExecCmdLineDetails2" Value="[QtExecCmdLine]" /> <CustomAction Id="QtExecCmdLineRun2" BinaryKey="WixCA" DllEntry="CAQuietExec" Return="ignore" /> <CustomAction Id="QtExecCmdLineSet3" Property="QtExecCmdLineRun3" Value=""[WindowsFolder]system32\cmd.exe" /c echo f | xcopy.exe /i /y "[INSTALLDIR]ReadMe.txt" "[%temp]\QtExecCmdLineRun3.txt"" /> <CustomAction Id="QtExecCmdLineGet3" Property="QtExecCmdLineDetails3" Value="[QtExecCmdLineRun3]" /> <CustomAction Id="QtExecCmdLineRun3" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore" /> <CustomAction Id="QtExecCmdLineSet4" Property="QtExecCmdLineRun4" Value=""[WindowsFolder]system32\cmd.exe" /c del /f "[%temp]\QtExecCmdLineRun*.txt"" /> <CustomAction Id="QtExecCmdLineGet4" Property="QtExecCmdLineDetails4" Value="[QtExecCmdLineRun3]" /> <CustomAction Id="QtExecCmdLineRun4" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore" /> <InstallExecuteSequence> <Custom Action="SetSystemDriveProperty" Before="CostInitialize">SystemDrive=""</Custom> <Custom Action="QtExecCmdLineSet1" After="InstallFiles">Not Installed</Custom> <Custom Action="QtExecCmdLineGet1" After="QtExecCmdLineSet1">Not Installed</Custom> <Custom Action="QtExecCmdLineRun1" After="QtExecCmdLineGet1">Not Installed</Custom> <Custom Action="QtExecCmdLineSet2" After="QtExecCmdLineRun1">Not Installed</Custom> <Custom Action="QtExecCmdLineGet2" After="QtExecCmdLineSet2">Not Installed</Custom> <Custom Action="QtExecCmdLineRun2" After="QtExecCmdLineGet2">Not Installed</Custom> <Custom Action="QtExecCmdLineSet3" After="QtExecCmdLineRun2">Not Installed</Custom> <Custom Action="QtExecCmdLineGet3" After="QtExecCmdLineSet3">Not Installed</Custom> <Custom Action="QtExecCmdLineRun3" After="QtExecCmdLineGet3">Not Installed</Custom> <Custom Action="QtExecCmdLineSet4" Before="QtExecCmdLineGet4">Installed</Custom> <Custom Action="QtExecCmdLineGet4" Before="QtExecCmdLineRun4">Installed</Custom> <Custom Action="QtExecCmdLineRun4" Before="RemoveFiles">Installed</Custom> <!--<Custom Action="QtExecCmdLineRun4" Before="RemoveFiles">Installed And REMOVE="ALL"</Custom>--> <!--<Custom Action="QtExecCmdLineRun4" Before="RemoveFiles">REMOVE And (DATABASES="1" And SERVICES="1" And SITES="1" And TOOLS="1")</Custom>--> </InstallExecuteSequence> /ob1 From: Bob Arnson [mailto:bo...@jo...] Sent: Tuesday, April 08, 2008 10:46 AM To: Robert O'Brien Cc: 'wix...@li...' Subject: Re: [WiX-users] CAQuietExec: Error 0x80070002: Command failed to execute. Robert O'Brien wrote: Tried this again using xcopy instead of robocopy for the second test and still failing in both CAQuietExec cases even though running them on the target system after install completes works just fine. I've also noted that if I just issue the commands w/o any parameters then the CAQuietExec action succeeds w/o errors. So it would appear how I'm specifying parameters for the command is what is causing issues. Assuming your subject line is what's showing up in the log, it's reporting that failure straight from CreateProcess. Also, as you're trying to copy what I'm guessing are installed files, you need to call CAQuietExec as a deferred CA; otherwise the files haven't been installed yet. -- sig://boB http://joyofsetup.com/ |