Thanks for the responses - I've gone with the file element. I don't really want the executable written to disk (it serves no purpose to the end user), but there's no harm in it being there.
On Fri, Jun 18, 2010 at 7:28 AM, Pally Sandher <pally.sand...@iesve.com>wrote: > Binary Elements are extracted to temporary directories using auto > generated filenames (see a verbose log for an example). It's not > possible to use an application in a Binary Element with QtExec (I looked > at the same thing a while ago for a plug-in installer). You'll either > need to change it to use a File Element & modify the CustomAction to use > [#fileid] instead of "myexec.exe" or live without QtExec or as > Blair says, write your own Custom Actions to write the Binary to disk in > a known location so QtExec can run it. > > Palbinder Sandher > Software Deployment & IT Administrator > T: +44 (0) 141 945 8500 > F: +44 (0) 141 945 8501 > > http://www.iesve.com > **Design, Simulate + Innovate with the <Virtual Environment>** > Integrated Environmental Solutions Limited. Registered in Scotland No. > SC151456 > Registered Office - Helix Building, West Of Scotland Science Park, > Glasgow G20 0SP > Email Disclaimer > > -----Original Message----- > From: Leigh Wetmore [mailto:lwetm...@gmail.com] > Sent: 17 June 2010 18:29 > To: wix-users@lists.sourceforge.net > Subject: [WiX-users] Quiet Execution of an executable embedded within > the MSI > > Hello, > > I'm trying to figure out how to quietly execute (QtExec) an executable > that I include within my MSI yet do not want installed on the user's > machine. > > I've been able to achieve this without using the quiet execute feature, > but I don't like the command window popping up during installation. > Here is the code for that: > > <Binary Id="CfgUpdateExe" SourceFile="..\bin\myexe.exe" /> > > <CustomAction > Id="LaunchCfgUpdateExe" > BinaryKey="CfgUpdateExe" > ExeCommand=""[TempFolder]UpdateLog.txt" UpdateAppConfig > "[DASLocation]myexec.exe.Config"" > Execute="deferred" > Impersonate="no" > Return="asyncNoWait" /> > > <InstallExecuteSequence> > <Custom Action="LaunchCfgUpdateExe" > After="InstallInitialize">OLDERVERSIONDETECTED</Custom> > </InstallExecuteSequence> > > I use the binary element to bring the executable (myexe.exe) into the > MSI, then launch a custom action with the necessary arguments. I have > it executing as deferred with no impersonation as I need the admin > privileges already captured by the installer to carry through to the > executable. > Again, this works fine. > > However, if I try to convert this to use QtExec, I'm unable to get it to > work. Looking in the MSI install log, I see: > > CAQuietExec: Error 0x80070002: Command failed to execute. > CAQuietExec: Error 0x80070002: CAQuietExec Failed > > Here is my code so far: > > <Binary Id="CfgUpdateExe" SourceFile="..\bin\myexec.exe" /> > > <CustomAction > Id="QtExecCommand" > Property="QtExecUserCfg" > Value=""myexec.exe" > "[TempFolder]UpdateLog.txt" > "UpdateAppConfig" "[DASLocation]myexec.exe.Config"" > Execute="immediate" /> > <CustomAction Id="QtExecUserCfg" BinaryKey="WixCA" > DllEntry="CAQuietExec" Execute="deferred" Impersonate="no" > Return="check"/> > > <InstallExecuteSequence> > <Custom Action="QtExecCommand" > After="CostFinalize">OLDERVERSIONDETECTED</Custom> > <Custom Action="QtExecUserCfg" > After="InstallInitialize">OLDERVERSIONDETECTED</Custom> > </InstallExecuteSequence> > > I've left the binary element there, but I don't think the custom actions > know about it. It looks like QtExec can't find the executable which > makes sense (I can have it run notepad.exe no problem). I'm thinking > maybe the files in the MSI, including myexec.exe, get extracted to a > temp directory during installation, and I can potentially reference it, > like Value=""[MSITempDir]myexec.exe...? > > Thanks in advance for any help anyone can provide. > > Leigh > ------------------------------------------------------------------------ > ------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's > Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the > prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users