Stop/Start NT Services 
Author Message
 Stop/Start NT Services

How can I start/Stop NT Services using WSH?

        Ming.



Tue, 13 Feb 2001 03:00:00 GMT  
 Stop/Start NT Services

You need to install ADSI in order to do it. Then you would do something like this:

Set ServiceObj = GetObject("WinNT://Your_Server/Your_Service")
ServiceObj.start
Set ServiceObj = nothing

Set ServiceObj = GetObject("WinNT://Your_Server/Your_Service")
ServiceObj.stop
Set ServiceObj = nothing

I have a sample script on my site that does this. You can also get ADSI there

Check it out
http://cwashington.netreach.net

Win32 bit scripting, lots of sample scripts, downloads,
referrence files, and technical support via an online discussion forum.


Quote:
>How can I start/Stop NT Services using WSH?

> Ming.



Tue, 13 Feb 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Script To Stop/Start NT Service

2. How to start/stop a NT service

3. Stop and Starting Services on NT

4. Starting and Stopping NT Services with ADSI,wsh, and VBScript

5. Start/Stop a NT Service using wsh/adsi

6. Starting and stopping NT services

7. How to start/stop a NT service...

8. Starting and Stopping NT Services from WSH/VBS

9. Stopping and Starting NT Services

10. Stopping and Starting NT Services

11. Start/Stop a NT Service using wsh/adsi

12. Starting/Stopping NT Services

 

 
Powered by phpBB® Forum Software