Windows自动启动程序并登陆账号密码的VBS脚本

TAIDONG 2018-01-05 AM 1726℃ 0条
dim program
program="程序路径"
set Wshell=CreateObject("Wscript.Shell")
set oexec=Wshell.Exec(program)
wscript.Sleep 2000
Wshell.SendKeys "{TAB}"
Wshell.SendKeys "{TAB}"
Wshell.SendKeys "账号"         
wscript.Sleep 1000
Wshell.SendKeys "{TAB}" 
Wshell.SendKeys "密码"          
Wshell.SendKeys "{TAB}"
Wshell.SendKeys "{TAB}"
Wshell.SendKeys "{TAB}"
Wshell.SendKeys "{ENTER}"        
Wscript.quit

新建文本文档,并复制内容,保存。修改文件后缀为“filename.vbs”。即可双击运行
备注:这是VBS脚本,可以实现简单的程序自动输入账号密码登陆,中间的TAB次数根据不同的程序会有不同的差异,请自行调整。

标签: Windows, VB

非特殊说明,本博所有文章均为博主原创。

评论啦~


选择表情