貌似不指定路径的话,默认从"我的文档"打开,试试:- @echo off
- more +7 %0>"%~dpn0.vbs"
- start "" "notepad"
- ping -n 2 127.1>nul
- start /wait "" "%~dpn0.vbs"
- del "%~dpn0.vbs"
- goto :eof
- set ws = CreateObject("wscript.shell")
- ws.AppActivate "notepad"
- wscript.sleep 1000
- ws.sendkeys "H"
- wscript.sleep 100
- ws.sendkeys "e"
- wscript.sleep 100
- Ws.SendKeys "l"
- wscript.sleep 100
- Ws.SendKeys "l"
- wscript.sleep 100
- Ws.SendKeys "e"
- wscript.sleep 100
- Ws.SendKeys "o"
- ws.sendkeys " cmd"
- wscript.sleep 100
- ws.sendkeys "{Enter}"
复制代码
|