Use this:

<CustomAction Id="RunBat" BinaryKey="WixCA" DllEntry="CAQuietExec" 
Execute="deferred" Return="ignore" Impersonate="no"/>
    <CustomAction Id="RunBat_Cmd" Property="RunBat"
                      Value="&quot;[SystemFolder]cmd.exe&quot; /D /E:ON /V:ON 
/C &quot;[INSTALLLOCATION]tomcat\bin\service.bat install Tomcat7&quot;"
                  Execute="immediate"
                  />

<Custom Action="RunBat_Cmd"       Before="RunBat"/>
<Custom Action="RunBat"       Before="InstallFinalize"/>

-----Original Message-----
From: Eric Chaland [mailto:e...@clm-consulting.com] 
Sent: Wednesday, April 23, 2014 1:10 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Custom action to run .bat file to install service

Hello,

I need to install and customize a service (Tomcat). I've created a custom 
action but the service doesn't get created.

What am I doing wrong?

Could anyone please share a sample - I need to run something like "service.bat 
install Tomcat"

Thanks in advance for your help.

 

<CustomAction Id="RunBat_Cmd" Property="RunBat" 

    Value="&quot;[SystemFolder]cmd.exe&quot; /D /E:ON /V:ON /C 
&quot;[INSTALLLOCATION]tomcat\bin\service.bat install Tomcat7&quot;"/>

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

 

<InstallExecuteSequence>

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

</InstallExecuteSequence>

 

Eric

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform Build your Enterprise 
Intranet with eXo Platform Software Java Based Open Source Intranet - Social, 
Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A 
Collaboration Platform http://p.sf.net/sfu/ExoPlatform 
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to