Hi
I have a script we run twice a day which (amongst many other things) checks the status of a Windows Service on various hosts. In short with "Set colRunningServices = objWMIService.ExecQuery ("Select * from Win32_Service Where Name = '" & strServiceName & "'")" and "strServiceStatus = objService.State".
The trouble is, if a server is, let's say, in a bit of a state, this check just sits there doing nothing until we reboot the server and restart the script. What I need is for it to give up checking the service after a certain amount of time.
Is possible?
JJ
[small][purple]Variables won't. Constants aren't[/purple]
There is no apostrophe in the plural of PC (or PST, or CPU, or HDD, or FDD, or photo, or breakfast...and so on)[/small]
I have a script we run twice a day which (amongst many other things) checks the status of a Windows Service on various hosts. In short with "Set colRunningServices = objWMIService.ExecQuery ("Select * from Win32_Service Where Name = '" & strServiceName & "'")" and "strServiceStatus = objService.State".
The trouble is, if a server is, let's say, in a bit of a state, this check just sits there doing nothing until we reboot the server and restart the script. What I need is for it to give up checking the service after a certain amount of time.
Is possible?
JJ
[small][purple]Variables won't. Constants aren't[/purple]
There is no apostrophe in the plural of PC (or PST, or CPU, or HDD, or FDD, or photo, or breakfast...and so on)[/small]