This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Re: Windows Service status check in IA2010
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 09, 2010
08:19 AM
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
Thanks
sathya
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 09, 2010
11:40 AM
You've got the Start, Stop, Pause Windows Service general action, as well as the Register Windows Service.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 12, 2010
10:17 AM
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
The Windows command sc query
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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 12, 2010
11:01 PM
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
Expecting more thoughts on this...
With Regards,
Sathya
![](/skins/images/3B39CE851FDD5528C393F146EB70A2D0/responsive_peak/images/icon_anonymous_message.png)