Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Help with a Service Script

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,38234
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Help with a Service Script
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Help with a Service Script - 9/29/2006 3:33:25 AM   
  TJ_0214

 

Posts: 1
Score: 0
Joined: 9/29/2006
Status: offline
If I wanted to write a script to detect if a service was running how would I write that.  I see all these scripts on how to stop and start.  Im just looking at picking a single service and check to see if its running or not.  If its not Im going to have it send an email to me letting me know. 

Thanks guyss
 
 
Post #: 1
 
 RE: Help with a Service Script - 9/29/2006 4:10:16 AM   
  ebgreen


Posts: 5246
Score: 31
Joined: 7/12/2005
Status: online
Use one of the start/stop scripts. The WMI class that they use has a .Started property that you can check.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to TJ_0214)
 
 
Post #: 2
 
 RE: Help with a Service Script - 10/1/2006 11:29:07 PM   
  mbouchard


Posts: 1924
Score: 16
Joined: 5/15/2003
From: USA
Status: online
I have been working on a tool to help diagnose and fix WSUS issues and here is a function that I created to query a remote service using PsService from Sysinternals.


      

_____________________________

Mike

For useful Scripting links see the Read Me First stickey!

Always remember Search is your friend.

(in reply to ebgreen)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Help with a Service Script Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts