How would you check is a service exists and if so do some operation?
feedback
|
|
The So you can query a particular service, if it exists, you will get details like the following:
Querying a service that doesn't exist results in:
So you can write a script to check for the response and then perform whatever action you want to based on that. If you're not stuck on using batch scripting, you can also write something much nicer in Powershell, such as
| ||||
|
feedback
|
|
After a little googling, here's little vb snippet for testing if a service exist and execute the start method.
Hope this helps. | |||
|
feedback
|