这是一段VBS的代码,求高手看下 它到底修改了什么服务!!!
'本脚本由【jimk】制作,转载请注明出[森林网吧]
'VBS配置系统服务
'※服务名注意大小写※
'[配置格式]服务名1:启动类型1;服务名2:启动类型2
'可选启动类型[0自动启动;1手动启动;2禁止启动;]
strServiceCfg="Spooler:2;Themes:2;NVSvc:2" '
SetServices strServiceCfg
MsgBox "配置系统服务完成!",vbInformation,"森林网吧"
'==========================================================================
Function SetServices(strCfg)
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer)
Set colServices = objWMIService.InstancesOf("Win32_Service")
For Each objService In colServices
arrStrCfgs=Split(strCfg,";")
For Each oneStrCfg In arrStrCfgs
If InStr(oneStrCfg,":")>0 Then
If objService.Name=Split(oneStrCfg,":")(0) Then
'[可打开,调试用]
'MsgBox "Service Name: "&objService.Name&vbCrLf&"DisplayName: "&objService.DisplayName&vbCrLf&"StartMode: "&objService.StartMode
If Split(oneStrCfg,":")(1)="0" Then
objService.ChangeStartMode("Automatic") '自动
ElseIf Split(oneStrCfg,":")(1)="1" Then
objService.ChangeStartMode("Manual") '手动
ElseIf Split(oneStrCfg,":")(1)="2" Then
objService.ChangeStartMode("Disabled") '禁用
End If
End If
End If
Next
Next
End Function