1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| ::OS detection
for /f "tokens=3" %%i in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CurrentVersion') do (
set WindowsVersion=%%i
)
if "%WindowsVersion%"=="5.1" (call :WindowsVersion_XP)
if "%WindowsVersion%"=="6.1" (call :WindowsVersion_SEVEN)
:WindowsVersion_XP
copy \\SRVPKDOM01\netlogon\fondecran.bmp %SYSTEMROOT%
reg add "HKEY_CURRENT_USER\Control Panel\Colors" /v Background /t REG_SZ /d "255 255 255" /f
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d "%SystemRoot%\fondecran.bmp" /f
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v TileWallpaper /t REG_SZ /d 0 /f
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v WallpaperStyle /t REG_SZ /d 2 /f
%SystemRoot%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
call :end_script
:WindowsVersion_SEVEN
copy \\SRVPKDOM01\netlogon\fondecran.bmp %SYSTEMROOT%
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d "%SystemRoot%\fondecran.bmp" /f
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v TileWallpaper /t REG_SZ /d "0" /f
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v WallpaperStyle /t REG_SZ /d "6" /f
reg add "HKEY_CURRENT_USER\Control Panel\Colors" /v Background /t REG_SZ /d "255 255 255" /f
%SystemRoot%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
call :end_script
:end_script
exit |
Partager