Board logo

标题: vbs 执行一个文件 [打印本页]

作者: lukchen     时间: 2008-9-2 17:34    标题: vbs 执行一个文件

str = d:\test.txt
Set WshShell = WScript.CreateObject("WScript.Shell")
wshshell.run "notepad.exe str"


上边是执行不成功的,我想问一下,如果我要运行的文件是个变量,该如何运行啊
作者: jmz573515     时间: 2008-9-2 19:07
str = "d:\test.txt"
Set WshShell = WScript.CreateObject("WScript.Shell")
wshshell.run "notepad.exe " & str
作者: HAT     时间: 2008-9-2 19:21
在帮助文档里面搜索run

Windows脚本技术.chm
http://upload.cn-dos.net/img/574.zip