本帖最后由 apang 于 2013-6-24 15:59 编辑
修改用户名、密码为实际- @echo off
- more +5 "%~f0">Work.vbs
- schtasks /create /tn "test" /tr \""%~dp0Work.vbs\"" /sc onstart /ru 登录用户名 /rp 密码
- goto :eof
-
- Dim ws,strPath,i
- Rem 下面是程序的路径
- strPath = "d:\a\a.exe"
- set ws = CreateObject("WScript.Shell")
- WScript.Sleep 60000 * 5 '延时5分钟,启动 d:\a\a.exe
- ws.Run strPath
- WScript.Sleep 20000 '延时20秒,按回车
- ws.SendKeys "{enter}"
- Rem 重复用上面的步骤直到输入完你要输入的值
- For i = 1 to 6 '循环6次(3分钟)
- ws.run "taskkill /f /im iexplore.exe",,True
- WScript.Sleep 30000 '延时30秒
- Next
复制代码
|