on error resume nextSet fso = CreateObject("Scripting.FileSystemObject")pt="C:\Users\mr.j\Pictures\gif" '存放图片的文件夹setbmpfol=fso.getfolder(pt)for each files in bmpfol.filesiffso.GetExtensionName(files.path)="bmp" Then bmppt = bmppt&files.path&"|"nextbmppt = left(bmppt,len(bmppt) - 1)ifbmppt = ""thenmesfbox"您选择的目录中不含有BMP图片,程序将退出!",64wscript.quitend ifbmpar = 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",0ws.run"RunDll32.exe USER32.DLL,UpdatePerUserSystemParaMeters"wscript.sleep 100 '更换壁纸的时间if i = ubound(bmper) then i = -1next
添加回答
举报
0/150
提交
取消