vbs实现恢复暂停的自动启动服务的脚本
时间:2020-12-07 17:17:05|栏目:VBS|点击: 次
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colListOfServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where State = 'Paused' and StartMode = 'Auto'")
For Each objService in colListOfServices
objService.ResumeService()
Next
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colListOfServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where State = 'Paused' and StartMode = 'Auto'")
For Each objService in colListOfServices
objService.ResumeService()
Next
上一篇:用vbs脚本获取网卡MAC,CPUID,硬盘序列号的实现代码
栏 目:VBS
本文标题:vbs实现恢复暂停的自动启动服务的脚本
本文地址:http://www.codeinn.net/misctech/30312.html