请问一下,想用批处理实行打开软件,实现自动输入用户名和密码,该怎么做?
已经实现了一半了,卡在最后面的输入用户名和密码。网上找了用vbs也没能输入成功。
有人能指点迷津一下吗?非常谢谢!- @echo off
- set username=ENGINEER
- set password=123456
-
- start "" "C:\Users\Public\Desktop\SAP Logon.lnk"
- timeout /T 5
- echo set oShell = CreateObject("WScript.Shell")>temp.vbs
- echo oShell.SendKeys "%{DOWN}">>temp.vbs
- echo oShell.SendKeys "%{ENTER}">>temp.vbs
- echo oShell.SendKeys %username%>>temp.vbs
- echo oShell.SendKeys "%{DOWN}">>temp.vbs
- echo oShell.SendKeys %password%>>temp.vbs
- echo oShell.SendKeys "%{ENTER}">>temp.vbs
- start /d "%~dp0" temp.vbs
- pause
复制代码
|