使用這個腳本,可以隨時讓它歇下來。當然也可以讓它繼續工作。
前提是,你必須是本機管理員。
這個腳本使用一各很過時的終止程序方法:ntsd.exe -c q -p ProcessID。所以以前有過一個bat版,之所以用VBS是因為效率高一點,而且沒有太多的黑色窗口。
主要思想是:循環終止程序+停止服務
代碼如下:
' 程序初始化,取得參數
If WScript.Arguments.Count = 0 Then
Call main()
WScript.Quit
Else
Dim strArg, arrTmp
For Each strArg In WScript.Arguments
arrTmp = Split(strArg, "=")
If UBound( arrTmp ) = 1 Then
Select Case LCase( arrTmp(0) )
Case "sep"
Call sep( arrTmp(1) )
Case "process_stop"
Call process_stop( arrTmp(1) )
Case "process_start"
Call process_start( arrTmp(1) )
Case "server_stop"
Call server_stop( arrTmp(1) )
Case "server_start"
Call server_start( arrTmp(1) )
Case "show_tip"
Call show_tip( arrTmp(1) )
Case Else
WScript.Quit
End Select
End If
Next
WScript.Quit
End If
' 主程序
Sub main()
If (IsRun("Rtvscan.exe", "") = 1) Or (IsRun("ccSvcHst.exe", "") = 1) Or (IsRun("SMC.exe", "") = 1) Then
Call SEP_STOP()
Else
Call SEP_START()
End If
End Sub
' 帶參數運行
Sub sep( strMode )
Select Case LCase(strMode)
Case "stop"
Call SEP_STOP()
Case "start"
Call SEP_START()
End Select
End Sub
' 停止SEP
Sub SEP_STOP()
Set wso = CreateObject("WScript.Shell")
'kill other app
Call process_clear()
'kill sep
wso.Run """" & WScript.ScriptFullName & """ server_stop=""SENS""", 0, True
'Get Me PID
Set pid = Getobject("winmgmts://.").InstancesOf("Win32_Process")
For Each id In pid
If LCase(id.name) = LCase("Wscript.exe") Then
mepid=id.ProcessID
End If
Next
'tips
wso.Run """" & WScript.ScriptFullName & """ show_tip=stop", 0, False
'stop service
wso.Run """" & WScript.ScriptFullName & """ server_stop=""SENS""", 0, True
wso.Run """" & WScript.ScriptFullName & """ server_stop=""Symantec AntiVirus""", 0, True
wso.Run """" & WScript.ScriptFullName & """ server_stop=""ccEvtMgr""", 0, True
wso.Run """" & WScript.ScriptFullName & """ server_stop=""SmcService""", 0, True
wso.Run """" & WScript.ScriptFullName & """ server_stop=""SNAC""", 0, True
wso.Run """" & WScript.ScriptFullName & """ server_stop=""ccSetMgr""", 0, True
'kill apps
wso.Run """" & WScript.ScriptFullName & """ process_stop=ccApp.exe", 0, False
wso.Run """" & WScript.ScriptFullName & """ process_stop=ccSvcHst.exe", 0, False
wso.Run """" & WScript.ScriptFullName & """ process_stop=SNAC.exe", 0, False
wso.Run """" & WScript.ScriptFullName & """ process_stop=Rtvscan.exe", 0, False
wso.Run """" & WScript.ScriptFullName & """ process_stop=SescLU.exe", 0, False
wso.Run """" & WScript.ScriptFullName & """ process_stop=Smc.exe", 0, False
wso.Run """" & WScript.ScriptFullName & """ process_stop=SmcGui.exe", 0, False
'wait
WScript.Sleep 15000
'kill other script
Set pid = Getobject("winmgmts://.").InstancesOf("Win32_Process")
For Each ps In pid
If (LCase(ps.name) = "wscript.exe") Or (LCase(ps.name) = "cscript.exe") Then ps.terminate
Next
'kill other app
Call process_clear()
'start ?
'Call SEP_START()
End Sub
' 恢復SEP
Sub SEP_START()
Set wso = CreateObject("WScript.Shell")
'tips
wso.Run """" & WScript.ScriptFullName & """ show_tip=start", 0, False
'start server
wso.Run """" & WScript.ScriptFullName & """ server_stop=""SENS""", 0, True
wso.Run """" & WScript.ScriptFullName & """ server_start=""Symantec AntiVirus""", 0, True
wso.Run """" & WScript.ScriptFullName & """ server_start=""ccEvtMgr""", 0, True
wso.Run """" & WScript.ScriptFullName & """ server_start=""SmcService""", 0, True
wso.Run """" & WScript.ScriptFullName & """ server_start=""SNAC""", 0, True
wso.Run """" & WScript.ScriptFullName & """ server_start=""ccSetMgr""", 0, True
Set wso = Nothing
End Sub
' 關閉進程
Function process_stop( strAppName )
Dim i
For i = 1 To 100
Set pid = Getobject("winmgmts://.").InstancesOf("Win32_Process")
For Each id In pid
If LCase(id.name) = LCase(strAppName) Then
Dim wso
Set wso = CreateObject("WScript.Shell")
wso.run "ntsd.exe -c q -p " & id.ProcessID, 0, True
End If
Next
WScript.Sleep 500
Next
End Function
' 停止服務
Sub server_stop( byVal strServerName )
Set wso = CreateObject("WScript.Shell")
wso.run "sc config """ & strServerName & """ start= disabled", 0, True
wso.run "cmd /c echo Y|net stop """ & strServerName & """", 0, True
Set wso = Nothing
End Sub
' 啟動服務
Sub server_start( byVal strServerName )
Set wso = CreateObject("WScript.Shell")
wso.run "sc config """ & strServerName & """ start= auto", 0, True
wso.run "cmd /c echo Y|net start """ & strServerName & """", 0, True
Set wso = Nothing
End Sub
' 顯示提示信息
Sub show_tip( strType )
Set wso = CreateObject("WScript.Shell")
Select Case LCase(strType)
Case "stop"
wso.popup chr(13) + "正在停止 SEP,
主站蜘蛛池模板:
91精品国产综合久久久欧美
|
国产精品视频久久久
|
一级免费特黄视频
|
www.9191.com|
911视频免费版
|
在线观看中文字幕av
|
欧美重口另类videos人妖
|
99亚洲伊人久久精品影院红桃
|
国产一级爱c视频
|
中国产一级毛片
|
黄色av网站免费看
|
午夜丰满少妇高清毛片1000部
|
欧美一级全黄
|
青青国产在线视频
|
色淫网站免费视频
|
亚洲影视在线
|
依人在线视频
|
午夜视频在线免费播放
|
国产亚洲欧美视频
|
黄视频在线网站
|
久久9999久久|
亚洲精品一区二区三区在线看
|
一级大片久久
|
91精品国产一区二区三区四区在线
|
日本欧美一区二区三区视频麻豆
|
在线观看视频亚洲
|
欧美日韩精品一区二区三区不卡
|
国产精品视频免费网站
|
成品片a免人视频
|
久久成人免费网
|
日本视频免费看
|
看毛片电影
|
午夜热门福利
|
毛片免费视频网站
|
综合图区亚洲
|
亚洲天堂在线电影
|
欧美日韩在线免费观看
|
久久蜜桃香蕉精品一区二区三区
|
久久久久久久免费视频
|
成人福利在线观看
|
牛牛碰在线视频
|