Function StartService(serviceName)
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colServiceList = objWMIService.ExecQuery _
("Select * from Win32_Service where Name='" & serviceName & "'")
For each objService in colServiceList
objService.StartService()
Next
End Function
Function StopService(serviceName)
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colServiceList = objWMIService.ExecQuery _
("Select * from Win32_Service where Name='" & serviceName & "'")
For each objService in colServiceList
objService.StopService()
Next
End Function</Script></ScriptBody>
<TimeoutSeconds>600</TimeoutSeconds>
</WriteAction>
</Recovery>