@ECHO OFF
set /a var = 0
:start
:: Adds the necessary Registry values, in case this person is using a System Wallpaper. If they've already customized their wallpaper, the following lines are not necessary. They won't hurt though.
if %var% == 0 (
REG ADD "HKCU\Control Panel\Desktop" /V Wallpaper /T REG_SZ /F /D "C:\poza_1.jpg"
) else (
REG ADD "HKCU\Control Panel\Desktop" /V Wallpaper /T REG_SZ /F /D "C:\poza_2.jpg"
)
set /a var = 1 - %var%
:: Change the last number in the following line to a 0 if you want to center the bitmap on the desktop. Change the last number in the following line to a 2 if you want to stretch the bitmap vertically and horizontally to fit the desktop.
REG ADD "HKCU\Control Panel\Desktop" /V WallpaperStyle /T REG_SZ /F /D 2
:: Change the last number in the following line to a 0 to not tile the image; setting it to a 1 Tiles it.
REG ADD "HKCU\Control Panel\Desktop" /V TileWallpaper /T REG_SZ /F /D 0
:: The following line refreshes the desktop.
%SystemRoot%\System32\RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters
:: sleep 2 minute
sleep 120
GOTO start
Daca suplimentar doriti sa rulati fisierul bat ca un serviciu (independent de consola), programul AlwaysUp poate fi util ;)
Niciun comentariu:
Trimiteți un comentariu