第1个回答 2009-07-29
'运行当前目录下所有exe,不包括子目录。
dim wsh,fso,f,p
set wsh=createobject("wscript.shell")
set fso=createobject("scripting.filesystemobject")
For Each f In fso.GetFolder(".").Files
p = f.Path
If LCase(fso.GetExtensionName(p)) = "exe" Then
wsh.run """" & p & """"
End If
Next
'-------------------------------
'不是无限循环,只是遍历文件本回答被提问者采纳