PDA

View Full Version : Register batch script as service



stainedart
05-20-2014, 03:31 PM
Hi,

I am looking to register through install anywhere a batch script as a windows service. Ezpak supports such a way to go and I was wondering how to achive a similar installation with Install Anywhere:

Here is a sample of the script that was used in ezpak along with XML configuration:


if "%1" == "start" goto start
if "%1" == "stop" goto stop
goto eof

:start
bin\some.exe -inifile config\some.ini -LogFile some_log .... [more params]
goto :eof

:stop
taskkill /F /FI "IMAGENAME eq some.exe"
goto :eof

:eof

<service>
<id>some</id>
<name>Something</name>
<description>Some Services</description>
<executable>${INSTALL_PATH}\bin\some.bat</executable>
<logpath>${INSTALL_PATH}</logpath>
<logmode>roll</logmode>
<depend>Spooler</depend>
<startargument>start</startargument>
<stopargument>stop</stopargument>
</service>

Not sure what is the approach I should be aiming and if this is even possible within InstallAnywhere 2013.

Regards,

Carl T.