Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Windows 7 Forum Vista Tutorials Tags

Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Microsoft Technical Newsgroups > VB Script

Controlling service restart timeout with WMI

Reply
 
LinkBack Thread Tools Display Modes
Old 08-25-2008   #1 (permalink)
Bob Smith
Guest


 
 

Controlling service restart timeout with WMI

I will put the question up front to help someone who may already know the
answer. Is there a way to change the timeout for a service stop/start in WMI?

I have written a script to stop and start windows services on a number of
servers using WMI.

objService.StopService()
objService.StartService()

If the proceedure returns anything other than a 0, The service failed to
stop or start. Periodically one of the services will not stop or start in
time resulting in an error, where the services is not stopped or started.
This seems to occur in a dwe

When you restart a service in Windows service manager there is a 60 second
wait time for the service to not respond before this timeout is reached. This
does not appear to be the case with WMI. Is there a way to change the timeout
in WMI?

Thanks for your help.

My System SpecsSystem Spec
Old 08-25-2008   #2 (permalink)
Owen Gilmore
Guest


 
 

Re: Controlling service restart timeout with WMI

On Aug 25, 7:24*am, Bob Smith <BobSm...@xxxxxx>
wrote:
Quote:

> I will put the question up front to help someone who may already know the
> answer. Is there a way to change the timeout for a service stop/start in WMI?
>
> I have written a script to stop and start windows services on a number of
> servers using WMI.
>
> objService.StopService()
> objService.StartService()
>
> If the proceedure returns anything other than a 0, The service failed to
> stop or start. Periodically one of the services will not stop or start in
> time resulting in an error, where the services is not stopped or started.
> This seems to occur in a dwe
>
> When you restart a service in Windows service manager there is a 60 second
> wait time for the service to not respond before this timeout is reached. This
> does not appear to be the case with WMI. Is there a way to change the timeout
> in WMI?
No, you'll have to use some sort of wait command between these 2 lines
if timeout is the problems.
-OG
My System SpecsSystem Spec
Reply

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
vista - keep needing to restart dns service andreww Vista networking & sharing 1 05-01-2007 03:58 AM
IEUser restart through Restart Manager works but... jgomezb@gmail.com Vista General 0 03-14-2007 12:55 PM
How do I restart the service of Windows Security Center? Loiselle Vista security 2 02-21-2007 04:43 AM
Windows Service Timeout in Vista Dapo Onawole Vista General 0 01-18-2007 11:50 AM


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53