如题:
判断一个文件夹里的一张图片,是那个格式,(.bmp\.jpg)
原因见 5 楼
以下是 everest79 解决的代码;
==============================================
:start
set rp="HKCU\control panel\desktop"
set /a tb=%random%%%8
for /r C:\桌面 %%i in (%tb%.*) do (
reg add %rp% /v TileWallpaper /d 0 /f
reg add %rp% /v Wallpaper /d %%~fi /f
reg add %rp% /v WallpaperStyle /d 2 /f
RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters
echo 更换桌面背景成功......)
pause
goto start
===============================================
测试条件:
在C盘里建一个“桌面”文件夹;里面放7张为.bmp格式的图片;
把上面代码复制到记事本里,另存为***.bat
执行看效果,
[ Last edited by iaide on 2007-1-18 at 09:10 AM ]
判断一个文件夹里的一张图片,是那个格式,(.bmp\.jpg)
原因见 5 楼
以下是 everest79 解决的代码;
==============================================
:start
set rp="HKCU\control panel\desktop"
set /a tb=%random%%%8
for /r C:\桌面 %%i in (%tb%.*) do (
reg add %rp% /v TileWallpaper /d 0 /f
reg add %rp% /v Wallpaper /d %%~fi /f
reg add %rp% /v WallpaperStyle /d 2 /f
RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters
echo 更换桌面背景成功......)
pause
goto start
===============================================
测试条件:
在C盘里建一个“桌面”文件夹;里面放7张为.bmp格式的图片;
把上面代码复制到记事本里,另存为***.bat
执行看效果,
[ Last edited by iaide on 2007-1-18 at 09:10 AM ]

