cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sathya_pazhoor
Level 4

Windows Service status check in IA2010

Is there any Predefined action in InstallAnywhere2010 which could check the status of a given windows service? Let me know whether this could be achieved through a plug-in? If it can be achieved, how could i do it?

Thanks
sathya
Labels (1)
0 Kudos
(3) Replies
pv7721
Level 20

You've got the Start, Stop, Pause Windows Service general action, as well as the Register Windows Service.
0 Kudos
TimWise
Level 2

One idea...

The Windows command sc query will give you the status of a service.

Use the Execute Command step to run the command. The variable $EXECUTE_STDOUT$ will be set with the status string.

Use rules on subsequent steps to match the variable (regexp) to the various states:
- Not installed: OpenService.*FAILED.*1060
- Installed and Running: STATE.*RUNNING
- Installed and Stopped: STATE.*STOPPED
0 Kudos
sathya_pazhoor
Level 4

How about using Installshield API to find the status of the services. Win32Service.java can be used to find whether the service is installed or not. And then using the method queryWin2kServiceStatusProcess(serviceName) in Win32Service to get the status of the installed service. Here we will have more control over the code as we are working in java world!!!

Expecting more thoughts on this...

With Regards,
Sathya
0 Kudos