How to start a windows service
Posted: Mon Feb 21, 2011 2:43 pm
Hi,
I am trying to start a windows service. Here is the msi code attached. I am using a batch file (installservice.bat) to install the service and then trying to start the service using Run Program. Any help is appreciated.
if Variable RUNAPP Equals TRUE
if Variable REMOVE Equals FALSE
if Variable SUCCESS Equals COMPLETE
Run Program $TARGETDIR$\_ClientAgents\BatchFile\DeleteFolders.bat (WAIT)
Run Program $TARGETDIR$\_ClientAgents\BatchFile\Install Service.bat (WAIT)
Run Program $TARGETDIR$\_ClientAgents\BatchFile\CreateFolders.bat (WAIT)
Set Variable SRVSTART to FALSE
Run Program $WINSYSDIR$\\net.exe start Atlas Store Daemon (WAIT, get result into variable SRVSTART)
if Variable SRVSTART Equals TRUE
Run Program $TARGETDIR$\_ClientAgents\Atlas.windowsAgent.exe
else
MessageBox: ATLAS STORE DAEMON, Atlas Store Daemon Service not started. Please start the service manually.
end
Comment: TO-DO: Insert command that starts your application here
end
end
Thanks
Prasanth Nair
I am trying to start a windows service. Here is the msi code attached. I am using a batch file (installservice.bat) to install the service and then trying to start the service using Run Program. Any help is appreciated.
if Variable RUNAPP Equals TRUE
if Variable REMOVE Equals FALSE
if Variable SUCCESS Equals COMPLETE
Run Program $TARGETDIR$\_ClientAgents\BatchFile\DeleteFolders.bat (WAIT)
Run Program $TARGETDIR$\_ClientAgents\BatchFile\Install Service.bat (WAIT)
Run Program $TARGETDIR$\_ClientAgents\BatchFile\CreateFolders.bat (WAIT)
Set Variable SRVSTART to FALSE
Run Program $WINSYSDIR$\\net.exe start Atlas Store Daemon (WAIT, get result into variable SRVSTART)
if Variable SRVSTART Equals TRUE
Run Program $TARGETDIR$\_ClientAgents\Atlas.windowsAgent.exe
else
MessageBox: ATLAS STORE DAEMON, Atlas Store Daemon Service not started. Please start the service manually.
end
Comment: TO-DO: Insert command that starts your application here
end
end
Thanks
Prasanth Nair