标签:win compute win32 put mode return ret next end
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colServiceList = objWMIService.ExecQuery ("Select * from Win32_Service where Name = ‘ShellHWDetection‘")
For Each objService in colServiceList
If objService.State = "Running" Then
objService.StopService()
Wscript.Sleep 5000
End If
errReturnCode = objService.ChangeStartMode("Disabled")
Next
禁止光盘优盘自动播放(Shell Hardware Detection服务)
标签:win compute win32 put mode return ret next end
原文地址:http://www.cnblogs.com/liuzhaoyzz/p/6408282.html