Torgeir
Wed Feb 09 09:30:39 CST 2005
Adam Sandler wrote:
> I don't want to do anything with the service other than change
> it's startup type from disabled to automatic...
>
> If oService.StartType = ADS_SERVICE_DISABLED Then
> oService.StartType = ADS_SERVICE_DEMAND_START
> oService.SetInfo
> WScript.Sleep 1000
> End If
>
> Does ADS_SERVICE_DEMAND_START the same thing as seeing startup
> type automatic when viewed from the MMC then?
>
Hi
The code above checks if the startup type of the service is set to
disabled, and if it is, the script will change it to Automatic
(as viewed from the MMC).
--
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/default.mspx