VBS-开机导入注册表
Option ExplicitDim 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
页:
[1]