on error resume next
Set fso = CreateObject("Scripting.FileSystemObject")
pt="C:\Users\mr.j\Pictures\gif" '存放图片的文件夹
setbmpfol=fso.getfolder(pt)
for each files in bmpfol.files
iffso.GetExtensionName(files.path)="bmp" Then bmppt = bmppt&files.path&"|"
next
bmppt = left(bmppt,len(bmppt) - 1)
ifbmppt = ""then
mesfbox"您选择的目录中不含有BMP图片,程序将退出!",64
wscript.quit
end if
bmpar = split(bmppt,"|")
Set ws = CreateObject("WScript.Shell")
for i = 0 to ubound(bmpar)
pt = bmpar(i)
ws.RegWrite"HKEY_CURRENT_USER\ControlPanel\Desktop\Wallpaper","0","REG_SZ"
ws.RegWrite"HKEY_CURRENT_USER\ControlPanel\Desktop\WallpaperStyle","2","REG_SZ"
ws.RegWrite"HKEY_CURRENT_USER\SoftWare\MicroSoft\Windos\CurrentVersion\Explorer\Advanced\ListviewShadow","1","REG_DWORD"
ws.run"gpupdata/force",0
ws.run"RunDll32.exe USER32.DLL,UpdatePerUserSystemParaMeters"
wscript.sleep 100 '更换壁纸的时间
if i = ubound(bmper) then i = -1
next
qq_尚晨_03700611