Don't waste time reinventing the wheel. See
http://wix.sourceforge.net/manual-wix3/qtexec.htm or
http://wix.sourceforge.net/manual-wix3/shellexec.htm

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: daniel.knoep...@noser.com [mailto:daniel.knoep...@noser.com] 
Sent: 13 July 2010 09:43
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Calling an exe file upon installation (works but
either cmd remains open, or installation does not finish)

Hi

As a wix newby i am having trouble launching a exe file. The process
created by the exe file should then run in the background just like a
windows service. (We cannot use a windows service however, for reasons I
cannot influence)

I tried several approaches but none with the desired result. I managed
to launch the process but the install does not terminate or the command
line remains open. This is what I have tried:

**** 1. Install does not terminate ********
- Process will be launched correctly, but installation does not
terminate until i kill process


<CustomAction Id="LaunchPrintProcessAction" Directory="PrintProcessDir"
Return="asyncNoWait" ExeCommand="[PrintProcessDir]PrintProcess.exe
-autostart" />



<InstallExecuteSequence>

<Custom Action="LaunchPrintProcessAction" After="InstallFinalize"/>

</InstallExecuteSequence>



**** 2.  Works but command line remains open  ********

(scheduling in execute3 sequence as above)



<CustomAction Id="LaunchPrintProcessAction" Directory="PrintProcessDir"
Return="ignore" ExeCommand="[SystemFolder]cmd.exe /C /K
&quot;PrintProcess.exe -autostart&quot;" />



**** 3. Does not seem to work (because of param /K) ********

(scheduling in execute3 sequence as above)



<CustomAction Id="LaunchPrintProcessAction" Directory="PrintProcessDir"
Return="ignore" ExeCommand="[SystemFolder]cmd.exe /C /K
&quot;PrintProcess.exe -autostart&quot;" />



**** C# Comit custom action launching process->

Error because i cannot access properties in non-immedate action ********



<CustomAction Id="KillPrintProcessAction" BinaryKey="CustomActionDll"
DllEntry="KillPrintProcess" Execute="commit" Return="check">

......

[CustomAction]

public static ActionResult LaunchPrintProcess(Session session)

{

....

string printProcessPath = session.GetTargetPath("PrintProcess");

...





This seems to be such a simple task I am struggling with. What do I have
to do to get this right.

I appreaciate any help.

Tanks in advance
------------------------------------------------------------------------
------
This SF.net email is sponsored by Sprint What will you do first with
EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to