|
  
|
1#
发表于 2007-4-22 06:19 PM
| 只看该作者
Option Explicit
Dim Folder
Folder = "d:\aaa" '设置你要执行的文件夹
Dim Wsh,fso
Set Wsh = WScript.CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
Dim f,fc,f1,ext
Set f = fso.GetFolder(Folder)
Set fc = f.Files
For Each f1 in fc
ext = LCase(fso.GetExtensionName(f1))
Select Case ext
Case "exe"
wsh.run f1,,true
Case "reg"
wsh.run "Regedit /s "& f1,,true
end Select
Next
Set fso=NoThing
Set Wsh = Nothing
WScript.quit |
感谢Baidu,Google,Dreams8给我这次机会!
还要感谢我的爸爸妈妈!
HOHO |
|