cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
AnnaGR
Level 3

How can I checheck whether the Windows service was seccessfully started

Hello!

I'm creating a service for my application in the post-install section with the 'execute target' action an then start it with the action 'Start Windows Service' with the option 'wait for the end of the service installation'. How can I check, whether the service was successfully started?

Thanks for any advice
Anna
Labels (1)
0 Kudos
(2) Replies
vr_iauser
Level 3

In the Post-Install view, add 'Execute Command'action after 'Start Windows Service' action and configure as follows:

Command Line: sc query

Then add 'Show message Dialog' configure it with some message stating 'Service Started Successfully', add 'Compare InstallAnywhere variables' rule to this action and configure as follows:

$EXECUTE_STDOUT$ Contains RUNNING

Where $EXECUTE_STDOUT$ contains the results of the 'Execute Command' action.

Thanks,
vr
0 Kudos
AnnaGR
Level 3

Thank you,

I've got another advice:

this action writes its results into the IA Variables EXECUTE_EXITCODE, EXECUTE_STDERR and EXECUTE_STDOUT. You can see it when you add action "Output Debug Information" with "Select the data to be output:" to "IA variables" and check the "Output to a file" checkbox
0 Kudos