本帖最后由 myzam 于 2011-3-21 20:32 编辑
1# zqz0012005
我个人认为run很exec方法的区别就一句话:
run 不返回对象
而exec返回对象。
看实例---调用记事本程序:- set oshell=createobject("wscript.shell")
- set oexec=oshell.run ("notepad.exe")
- msgbox oexe.processid
复制代码 但你不能这样用run:- set oshell=createobject("wscript.shell")
- set orun=oshell.run("notepad.exe")
- msgbox orun.processid
复制代码 run不返回对象,所以你只能这样用run:- set oshell=createobject("wscript.shell")
- oshell.run "notepad.exe"
复制代码
|