|
|
大家好:
用批处理调用vbs并传递参数给vbs,一般的还好了,就是双引号老是传递不了.
例子如下:
批处理
@echo off
start test.vbs {~}!^@^#^${%%}{^&^}{^^}{*}{(}{)}{_}{-}{=}{+}.;:'"
____________________________
vbs
set tch=wscript.createobject("wscript.shell")
tch.run "telnet"
wscript.sleep 300
tch.sendkeys "open 127.0.0.1{enter}"
wscript.sleep 300
tch.sendkeys "y{enter}"
wscript.sleep 300
tch.sendkeys "f1321837{enter}"
wscript.sleep 300
tch.sendkeys "899549{enter}"
wscript.sleep 300
mm=wscript.arguments(0)
tch.sendkeys mm &"{enter}"
wscript.sleep 300
set tch=nothing
结果:
除了最后一个双引号出不来后别的都可以正常显示到telnet窗口上.
两个双引号一起也试了下,不行.
请教大家.谢谢! |
|