@echo off (echo set Wshell=CreateObject^("Wscript.Shell"^)
echo Wshell.AppActivate "taskeng.exe"echo wscript.Sleep 2000 echo Wshell.SendKeys "123456{ENTER}" echo Wshell.SendKeys "")>"%tmp%\inputpassword.vbs" start "" "%tmp%\inputpassword.vbs" mysqldump -P 3307 -h localhost -u root -p db1 >D:\database\db1.sql (echo set Wshell=CreateObject^("Wscript.Shell"^)
echo Wshell.AppActivate "taskeng.exe"echo wscript.Sleep 2000 echo Wshell.SendKeys "123456{ENTER}" echo Wshell.SendKeys "")>"%tmp%\inputpassword.vbs" start "" "%tmp%\inputpassword.vbs" mysqldump -P 3307 -h localhost -u root -p db2>D:\database\db2.sql (echo set Wshell=CreateObject^("Wscript.Shell"^)
echo Wshell.AppActivate "taskeng.exe"echo wscript.Sleep 2000 echo Wshell.SendKeys "
bat调用vbs脚本自动输入密码
最新推荐文章于 2021-10-22 13:55:30 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)