vbs实现恢复暂停的自动启动服务的脚本
程序员文章站
2022-06-23 21:14:46
strcomputer = "." set objwmiservice = getobject("winmgmts:"&n...
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
上一篇: HEVC代码学习:帧间预测——MVP过程中MV的获取、传递及存储
下一篇: webgl渲染过程