Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


check services

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> check services
  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 >>
 check services - 7/24/2007 4:30:11 AM   
  sheepz


Posts: 247
Score: 2
Joined: 3/17/2006
From: Riverside the 909s
Status: offline
i have this check service script but it only seems to check the first service and then stops


      

it only checks "alerter" and does not go into the For Each loop for the next DHCP or Diskeeper.  i know it loops thru because i msg out the arrTemp(i) and see the names, but the inner for each loop doesnt run after the first entry.
 
 
Post #: 1
 
 RE: check services - 7/24/2007 5:03:22 AM   
  DiGiTAL.SkReAM


Posts: 1184
Score: 7
Joined: 9/6/2005
From: Florida, USA
Status: offline
Well, first off you are using the wrong name for the DHCP Client.  The 'Name' value for that service is 'Dhcp', whereas the DisplayName value for that service is 'DHCP Client'.

You could replace this line:

      
with this line:

      

And would get better results.

_____________________________

"Would you like to touch my monkey?" - Dieter (Mike Meyers)

"It is better to die like a tiger, than to live like a pussy."
-Master Wong, from Balls of Fury

(in reply to sheepz)
 
 
Post #: 2
 
 RE: check services - 7/24/2007 5:21:04 AM   
  sheepz


Posts: 247
Score: 2
Joined: 3/17/2006
From: Riverside the 909s
Status: offline
i overlooked that i took the display name rather than the service name.  hencing doing so the 2nd for each loop did run it just didn't find a service name called "dhcp client."  thanks digital.scream, i used that example line and producing much better results. 

(in reply to DiGiTAL.SkReAM)
 
 
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 >> check services 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