|
sjs0512
中级用户
  
积分 201
发帖 69
注册 2005-12-7
状态 离线
|
『楼 主』:
vbs无弹出窗口调用程序脚本的问题
使用 LLM 解释/回答一下
dim objshell
set objshell=wscript.createobject("wscript.shell")
wscript.sleep(10000)
iReturn=objshell.Run("cmd.exe/c \\127.0.0.1\e:\1.bat",0,true)
无弹出窗口调用e:\1.bat文件。可是我的这个VBS脚本老是有问题。请问哪里有问题啊。急切!
dim objshell
set objshell=wscript.createobject("wscript.shell")
wscript.sleep(10000)
iReturn=objshell.Run("cmd.exe/c \\127.0.0.1\e:\1.bat",0,true)
There is no pop-up window to call the e:\1.bat file. But there is always a problem with my VBS script. Where is the problem? Urgent!
|
|
2007-4-19 11:15 |
|
|
flyinspace
银牌会员
    
积分 1206
发帖 517
注册 2007-3-25
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
我不懂vbs。。但好象你的不合要求哦。
set objshell=wscript.createobject("wscript.shell")
wscript.sleep(1000)
iReturn=objshell.Run("cmd.exe",1,true)
这样好象可以了。。。
DIM 好象有要求是大写的。
I don't understand VBS... But it seems yours doesn't meet the requirements.
set objshell=wscript.createobject("wscript.shell")
wscript.sleep(1000)
iReturn=objshell.Run("cmd.exe",1,true)
This seems okay...
DIM seems to have a requirement of being in uppercase.
|

知,不觉多。不知,乃求知 |
|
2007-4-19 12:15 |
|
|
zh159
金牌会员
     
积分 3687
发帖 1467
注册 2005-8-8
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
VBS里好像无所谓大小写
运行cmd参数有误,/c和cmd之间一定要有空格,修改:
iReturn=objshell.Run("cmd.exe /c \\127.0.0.1\e:\1.bat",0,true)
There seems to be no distinction between uppercase and lowercase in VBS.
There is an error in the parameters of running cmd. There must be a space between /c and cmd. Modify:
iReturn=objshell.Run("cmd.exe /c \\127.0.0.1\e:\1.bat",0,true)
|
|
2007-4-19 12:41 |
|
|
sjs0512
中级用户
  
积分 201
发帖 69
注册 2005-12-7
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
还是不行啊,在你的机子上可以吗
Still not working. Does it work on your machine?
|
|
2007-4-19 13:17 |
|
|
lililulula
中级用户
  
积分 302
发帖 138
注册 2007-3-29
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
set objshell=wscript.createobject("wscript.shell")
objshell.run "path:\batfilename",0
iReturn=objshell.Run("cmd.exe/c \\127.0.0.1\e:\1.bat",0,true)
远程机器下的程序的话,楼主可以先把远程目录映射为本地盘符,再执行调用.
set objshell=wscript.createobject("wscript.shell")
objshell.run "path:\batfilename",0
iReturn=objshell.Run("cmd.exe/c \\127.0.0.1\e:\1.bat",0,true)
For programs on a remote machine, the owner can first map the remote directory to a local drive letter and then perform the call.
|
|
2007-4-19 23:07 |
|