wshshell
=
createobject("wscript.shell")
wshshell.run
"notepad.exe",
,
true
也可以循环监视
oexec.status
=wshfinished
确定程序是否已退出
pro="c:\windows\system32\notepad.exe"'要打开的程序,写完整路径n=split(pro,"\")
name=n(ubound(n))
for each ps in getobject("winmgmts:\\.\root\cimv2:win32_process").instances_
s=s&sep&ps.name:sep="|":next
s=split(s,"|")
for i=0 to ubound(s)
if name=s(i) then wscript.quit
next
createobject("wscript.shell").run pro
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)