strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")Set colServiceList = objWMIService.ExecQuery ("Select * from Win32_Service where Name = 'ShellHWDetection'")For Each objService in colServiceListIf objService.State = "Running" ThenobjService.StopService()Wscript.Sleep 5000End IferrReturnCode = objService.ChangeStartMode("Disabled")Next