Board logo

标题: 运行VBS出错 [打印本页]

作者: monday     时间: 2007-12-6 14:21    标题: 运行VBS出错
on error resume next
dim fu,gui,cgo,mdir,game,mgame
set fu = wscript.createObject("wscript.shell")
Set gui = WScript.CreateObject("Scripting.FileSystemObject")
cgo = "1.bat"
mdir = wscript.arguments.item(0)
game = wscript.arguments.item(1)
mgame = "cmd /c cd /d "&mdir&" &&start "&game
If gui.FileExists(mdir & game) Then
fu.run mgame,0,0
else
fu.run cgo
WScript.Sleep(9000)
fu.run mgame,0,0
end if

运行这段代码 可是直接就出来一个 cmd 窗口 上面是 我的程序所在盘符

F:\

大家帮我看看应该是哪的原因啊?