VBS脚本合集(自制脚本)

 

一、视频搜索器选择:


Selectitem()
 
'#########################################

Function  Selectitem()

'Set VedioSearch=WScript.CreateObject("wscript.shell")

Dim demo

demo=InputBox("请选择进入的功能模块:1、进入美电贝尔设备搜索器;2、进入搜索视频监控设备;3、进入大华视频搜索器;4、进入海康视频搜索器;5、进入十五所视频搜索器")

Select  Case demo

Case "1" demo1()
Case "2" demo2()
Case "3" demo3()
Case "4" demo4()
Case "5" demo5()

End Select

End Function


'#########################################
'美电贝尔设备搜索器
Function demo1()

Set VedioSearch=WScript.CreateObject("wscript.shell")
VedioSearch.Run """AEBellSearchTool\AEBellSearchTool.exe"""

End Function


'#########################################
'搜索视频监控设备
Function demo2()

Set VedioSearch=WScript.CreateObject("wscript.shell")
VedioSearch.Run """VedioSearch\DeviceSearch.exe"""

End Function


'#########################################
'大华视频搜索器
Function demo3()

Set VedioSearch=WScript.CreateObject("wscript.shell")
VedioSearch.Run """VedioSearch\ConfigTool.exe"""

End Function


'#########################################
'海康视频搜索器

Function demo4()

Set VedioSearch=WScript.CreateObject("wscript.shell")
VedioSearch.Run """VedioSearch\IPCTools.exe"""

End Function


'#########################################
'十五所视频搜索器
Function demo5()

Set VedioSearch=WScript.CreateObject("wscript.shell")
VedioSearch.Run """VedioSearch\IPInstaller.exe"""

End Function

 

 

二、自动定时关闭打开的应用程序

Dim app
Set app=WScript.CreateObject("wscript.shell")

app.Run """\WriteFileTest.exe"""

Call callkilltime()

Function callkilltime()

WScript.Sleep 1200000
app.Run "taskkill /im WriteFileTest.exe /f ",vbhide


End Function

 

三、自动结束进程名:

set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys "^{ESC}R"  
wscript.sleep 2000
WshShell.SendKeys "taskkill /f /im notepad.exe"  
WshShell.SendKeys "{Enter}"

三、

posted @ 2013-09-04 18:15  狂师  阅读(1240)  评论(0编辑  收藏  举报