View Single Post
Old 02-02-2009   #4 (permalink)
pfildes


Vista 32bit
 
 

Re: stop and start windows update service

is there any way to run this code as an admin, i need to run it as a startup script in group policy, however it wont run as users dont have admin permission.

any help would be much appreciated as been looking everywhere.

thanks


sStartName = "wuauserv"

Set WMI = GetObject("WinMgmts:")
Set oServ2 = WMI.Get("Win32_Service.Name='" & sStartName & "'")
iRet = oServ2.ChangeStartMode("disabled")
If (oServ2.State = "Running") Then iRet2 = oServ2.StopService
Set oServ2 = Nothing
Set WMI = Nothing
My System SpecsSystem Spec