VBA to get the State of a Service

Vedaanth137
NewLounger
Posts: 15
Joined: 20 Oct 2016, 09:50

VBA to get the State of a Service

Post by Vedaanth137 »

Hi,

I have with me couple of Host Names and their corresponding Service Name.
Is it possible to fetch the State of a Service via Macro.
If the state is Running, it shall return "Running"...
If Stopped, then "Stopped"

Thank you.


Example

Column1 | Column 2 | State
euws2008 | bthserv | Running

User avatar
HansV
Administrator
Posts: 78631
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: VBA to get the State of a Service

Post by HansV »

That is beyond me, but see if you find something useful in the last reply at:

calling system command in Vb script

or in

Check if a Service is Running
Best wishes,
Hans

Vedaanth137
NewLounger
Posts: 15
Joined: 20 Oct 2016, 09:50

Re: VBA to get the State of a Service

Post by Vedaanth137 »

Okay Hans, i will check.
Thank you.