vbs实现恢复暂停的自动启动服务的脚本
发布时间:2016-12-28 来源:查字典编辑
摘要:strComputer="."SetobjWMIService=GetObject("winmgmts:"_&"{impersonation...
strComputer="."
SetobjWMIService=GetObject("winmgmts:"_
&"{impersonationLevel=impersonate}!"&strComputer&"rootcimv2")
SetcolListOfServices=objWMIService.ExecQuery_
("Select*fromWin32_ServiceWhereState='Paused'andStartMode='Auto'")
ForEachobjServiceincolListOfServices
objService.ResumeService()
Next