You could do something like this:

  <CustomAction Id="RunBat_Cmd" Property="RunBat" 
Value="&quot;[SystemFolder]cmd.exe&quot; /D /E:ON /V:ON /C 
&quot;[#batchfile.bat]&quot;"/>

I used the /D /E:ON and /V:ON in order to get a well-known environment 
without any surprises (hence turning off auto-run commands and turning 
extensions and delayed evaluation on).  In general, the batch file 
should be written in such a way that it does not depend upon anything 
beyond the environment you can control.  You can, of course, pass 
additional arguments on the command line (be sure to put them inside the 
&quot; entities).

  <CustomAction Id="RunBat" BinaryKey="WixCA" DllEntry="CAQuietExec" 
Execute="deferred" Return="check"/>

CAQuietExec will hide the command window entirely.  If the batch file is 
only for information gathering, then you can execute in immediate mode.

Be sure to schedule RunBat_Cmd before RunBat and before InstallInitialize.

Thanks,

Thomas S. Trias
Senior Developer
Artizan Internet Services
http://www.artizan.com/


-------- Original Message  --------
Subject: [WiX-users]  Run a .bat file minimized?
From: Tabmow <tabmo...@gmail.com>
To: wix-users@lists.sourceforge.net
Date: 4/14/2009 10:01 PM
> Hi all,
>    In our installer (using Wix 2.x on Win2003), we have to invoke a couple 
> .bat files for various and sundry things.   When they run, they launch a dos 
> shell which goes above our install gui.    Is there any way to have it 
> spawned 'minimized' at least so there's no distraction during install?  ie. 
> similar to what 'start /min my.bat' does.   I've tried just adding 'start 
> /min' in front of my .bat invocation in my custom action, but that gave an 
> error.   Does anyone have any suggestions?
>
> Thanks.
>
>   


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to