1.check out which service had been Disabled.
2.can start/stop/disable/enable a service.
Thanks.
Paley Woo
> I'm an newbie of script. Does anyone so kind write code to finish these
> jobs:
>
> 1.check out which service had been Disabled.
>
> 2.can start/stop/disable/enable a service.
Hi
Here is some examples:
======================================================
ADSI and the WinNT provider (I prefer it over WMI):
Subject: Re: Check state of services
http://groups.google.com/groups?selm=3E83986E.9EEE0304%40hydro.com
Subject: Re: VBS - Services Running? - Please help.
http://groups.google.com/groups?selm=3E84D2AC.4496450D%40hydro.com
Subject: Re: How to disable/ enable devices from the device-manager with
WSH-script?
http://groups.google.com/groups?selm=3DF9F374.DB880B50%40hydro.com
Subject: Re: Starting Service using WSH
http://groups.google.com/groups?selm=3E79C86B.3FFFD96D%40hydro.com
Subject: Re: How can I remotely stop a service?
http://groups.google.com/groups?selm=3DFA62B9.36B6204%40hydro.com
From: Torgeir Bakken
http://groups.google.com/groups?selm=3D8F5402.AB59D491%40hydro.com
Above is a script that reads server names from servers.txt, and for each server
compares running services with a list of services (the service name) from the
file services.txt.
Connection errors and the status of the services (Running/Not started) are
reported in the file StatusServices.txt.
======================================================
Here is an example with SC.exe, ADSI and WMI:
From: Torgeir Bakken (Torgeir.B...@hydro.com)
Subject: Re: Start 4 Services Check that they have succesfuly started
http://groups.google.com/groups?selm=3D4B51EA.2098A681%40hydro.com
The disabled check can be done with a registry read as well:
http://groups.google.com/groups?selm=3E6D0077.8CC0D9%40hydro.com
======================================================
WMI
January 29, 2003
Windows Services Management With WMI (Part 1)
http://www.serverwatch.com/tutorials/article.php/1576131
February 11, 2003
Windows Services Management With WMI (Part 2)
http://www.serverwatch.com/tutorials/article.php/1582271
Subject: Re: Error trapping for Services running in XP
http://groups.google.com/groups?selm=3EA475C8.2BD722C2%40hydro.com
======================================================
You could take a look at the Services section here as well:
http://www.microsoft.com/technet/scriptcenter
--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter
Paley Woo
"Torgeir Bakken (MVP)" <Torgeir.B...@hydro.com> 写入邮件
news:3F4947CC...@hydro.com...