Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check for wscript running on multiple servers 1

Status
Not open for further replies.

johnpayback

IS-IT--Management
Oct 2, 2006
110
US
Sorry to post again when I am still working on another post but I think this one should be easy. I need to write a script to check to see if wscript.exe is running on multiple servers. I would like to run the script from a central location and output the results to the screen. Would it be better to use something such as pstools from sysinternals in my script to accomplish this or straight vbscript?

JP
 
In particular you're going to want to look at the Win32_Process class.



--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Thank you. Using the Win32_Process class works like a charm. Now I just have to take my results and if it isn't running start the vbscript that should be running. Long story but I'll post once I get it totally complete.

JP
 
You can have a script start the one that should be running using the Exec method and then get the process ID, then use Win32_Process to monitor for that process ID and if it can not be found, re-launch.

If running WinXP/Win2k3 you can see the script name running under that particular wscript or cscript process. You can see an example in one of the HTA's I posted.

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top