- 帖子
- 96
- 积分
- 71
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2012-10-21
|
我想做一个在共享盘中下载一个批处理和一个VBS,VBS里面是密码然后运行VBS起到一个自动输入密码的方法用RUNAS命令运行批处理。但是实际上写好了以后一直会出现死循环的状态,用工具调试又是好的 还请帮忙看看。谢谢
一下是我的代码:
@echo off
xcopy /y "\\ch15w0001\data$\25 IT Tools\b.vbs" C:\Users\%username%\Desktop\
xcopy /y "\\ch15w0001\data$\25 IT Tools\打印机添加程序.bat" C:\Users\%username%\Desktop\
start C:\Users\%username%\Desktop\b.vbs
runas /user:SUPPORT C:\Users\%username%\Desktop\打印机添加程序.bat
del C:\Users\%username%\Desktop\打印机添加程序.bat
del C:\Users\%username%\Desktop\b.vbs
exit
VBS代码:
dim wsh
set wsh=WScript.CreateObject("WScript.Shell")
wscript.sleep 900
wsh.SendKeys "Password123"
wscript.sleep 500
wsh.SendKeys "{enter}"
是不是有什么地方不对呢?? |
|