在记事本中用VBS代码写了TELNET交换机,并输入密码登陆执行完命令后,怎么自动关闭CMD窗口。
比如以下代码:dimwshshellsetwshshell=createobject("wscript.shell")wshshell.run"cmd"wscript.s...
比如以下代码:
dim wshshell
set wshshell=createobject("wscript.shell")
wshshell.run "cmd"
wscript.sleep 1000
wshshell.sendkeys "telnet "
wscript.sleep 200
wshshell.sendkeys "10.0.0.1"
wscript.sleep 200
wshshell.sendkeys "{ENTER}"
wscript.sleep 200
wshshell.sendkeys "user"
wscript.sleep 200
wshshell.sendkeys "{ENTER}"
wscript.sleep 200
wshshell.sendkeys "passwd"
wshshell.sendkeys "{ENTER}"
wshshell.sendkeys "sysname"
wscript.sleep 300
wshshell.sendkeys "{ENTER}"
wshshell.sendkeys "display configuration"
wscript.sleep 300
wshshell.sendkeys "{ENTER}" 展开
dim wshshell
set wshshell=createobject("wscript.shell")
wshshell.run "cmd"
wscript.sleep 1000
wshshell.sendkeys "telnet "
wscript.sleep 200
wshshell.sendkeys "10.0.0.1"
wscript.sleep 200
wshshell.sendkeys "{ENTER}"
wscript.sleep 200
wshshell.sendkeys "user"
wscript.sleep 200
wshshell.sendkeys "{ENTER}"
wscript.sleep 200
wshshell.sendkeys "passwd"
wshshell.sendkeys "{ENTER}"
wshshell.sendkeys "sysname"
wscript.sleep 300
wshshell.sendkeys "{ENTER}"
wshshell.sendkeys "display configuration"
wscript.sleep 300
wshshell.sendkeys "{ENTER}" 展开
1个回答
大雅新科技有限公司
2024-11-19 广告
2024-11-19 广告
这方面更多更全面的信息其实可以找下大雅新。深圳市大雅新科技有限公司从事KVM延长器,DVI延长器,USB延长器,键盘鼠标延长器,双绞线视频传输器,VGA视频双绞线传输器,VGA延长器,VGA视频延长器,DVI KVM 切换器等,优质供应商,...
点击进入详情页
本回答由大雅新科技有限公司提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询