|
|
楼主 |
发表于 2011-12-11 14:40:17
|
显示全部楼层
本帖最后由 ygqiang 于 2012-3-22 08:16 编辑
最终解决方法:
- @echo off
- if "%1" == "h" goto begin
- mshta vbscript:createobject("wscript.shell").run("%~fs0 h",0)(window.close)&&exit
- :begin
- rem 下边开始写批处代码了(适合全自动场合)
- taskkill /f /im thirdIO20.exe
- taskkill /f /im CCS.exe
- taskkill /f /im ccsSvcLg.exe
- taskkill /f /im CCS_Door.exe
- del /f /q c:\test.vbs
- (echo set wshell=createobject^("wscript.shell"^)
- echo wshell.run """F:\上机管理\CCS20\CCS.exe""",1
- echo wscript.sleep 15000 '15秒
- echo wshell.sendkeys "111111"
- echo wscript.sleep 2000 '2秒
- echo wshell.sendkeys "{enter}"
- )>"c:\test.vbs"
- ping 127.0.0.1 -n 5 >nul 2>nul
- start F:\上机管理\CCS20\thirdIO20.exe
- ping 127.0.0.1 -n 5 >nul 2>nul
- start c:\test.vbs
- ping 127.0.0.1 -n 20 >nul 2>nul
- start F:\上机管理\CCSSvcLg\ccsSvcLg.exe
- ping 127.0.0.1 -n 10 >nul 2>nul
- del /f /q c:\test.vbs
- f:
- cd\
- cd F:\上机管理\CCSDoor20\
- start CCS_Door.exe
- ping 127.0.0.1 -n 5 >nul 2>nul
- exit
复制代码 |
|