This is an old revision of the document!
https://www.dropbox.com/s/i0eyyr6slpmpevs/wallpaper_logon.zip
├ wallpaper │ └ <width>x<height>.bmp ├ logon │ └ background<width>x<height>.jpg ├ setup.ins ← Made by bbz_edv ├ getmaxresolution.exe ← Made by bbz_edv (Written in C++) └ ResSwitch.exe ← Made by Naughter Software [[http://www.naughter.com/]]
[Initial]
SetLogLevel=7
; Log Errors in Logfile but don't abort:
ExitOnError=false
; Show syntax errors in the script:
ScriptErrorMessages=on
; Dont trace step by step through the script:
TraceMode=off
; let started programs run in front of the winst window
StayOnTop=false
[Actions]
;;Trigger WMI-Query
DosInAnIcon_Get_Horizontal
DosInAnIcon_Get_Vertical
;;
;;Process WMI-Query
DefStringList $dos_horizontal_list$
DefStringList $dos_vertical_list$
DefVar $resolution$
;
Set $resolution$ = Trim (takeString(2,getOutStreamFromSection ('DosInAnIcon_Get_Horizontal'))) + "x" + Trim (takeString(2,getOutStreamFromSection ('DosInAnIcon_Get_Vertical')))
;;
;;Windows 7 Theme
DefVar $Theme_Win7_Name$
DefVar $Theme_Win7_WindowColor$
;
Set $Theme_Win7_Name$ = "BBZ"
Set $Theme_Win7_WindowColor$ = "FROST"
;;
;;Wallpaper & Logon Source
DefVar $Wallpaper_Src_Dir$
DefVar $Wallpaper_Src$
DefVar $Logon_Src_Dir$
;
Set $Wallpaper_Src_Dir$ = "%ScriptPath%\wallpaper\"
Set $Wallpaper_Src$ = $Wallpaper_Src_Dir$+$resolution$+".bmp"
Set $Logon_Src_Dir$ = "%ScriptPath%\logon\"
;;
;;Wallpaper & Logon Destination
DefVar $Wallpaper_WinXP_Dst$
DefVar $Wallpaper_Win7_Dst$
DefVar $Wallpaper_WinXP_Dst_Dir$
DefVar $Wallpaper_Win7_Dst_Dir$
DefVar $Logon_Win7_Dst_Dir$
;
Set $Wallpaper_WinXP_Dst_Dir$ = "C:\WINDOWS\Web\Wallpaper\"
Set $Wallpaper_Win7_Dst_Dir$ = "C:\WINDOWS\Web\Wallpaper\"+$Theme_Win7_Name$+"\"
Set $Wallpaper_WinXP_Dst$ = $Wallpaper_WinXP_Dst_Dir$+$resolution$+".bmp"
Set $Wallpaper_Win7_Dst$ = $Wallpaper_Win7_Dst_Dir$+$resolution$+".bmp"
Set $Logon_Win7_Dst_Dir$ = "C:\Windows\System32\oobe\info\backgrounds\"
;;
;;Check OS and ExitCode
DefVar $ExitCode$
DefVar $MSVersion$
;
Set $MSVersion$ = GetMsVersionInfo
;;
;;Check maximum Screen Resolution
DefVar $max_screen_resolution$
DefVar $max_screen_horizontal$
DefVar $max_screen_vertical$
;
DosInAnIcon_Get_Max_Resolution
Set $max_screen_resolution$ = Trim (takeString(0,getOutStreamFromSection ('DosInAnIcon_Get_Max_Resolution')))
Set $max_screen_horizontal$ = takeString(0, splitString($max_screen_resolution$, "x"))
Set $max_screen_vertical$ = takeString(1, splitString($max_screen_resolution$, "x"))
If ( $resolution$ = $max_screen_resolution$)
If ( $MSVersion$ >= "6" )
If FileExists($Wallpaper_Src$)
comment "Ihr Standard-Wallpaper wird nun aktualisiert"
Files_Wallpaper_Win7 /SysNative
Registry_Wallpaper_Win7 /SysNative
set $ExitCode$ = "0"
Else
comment "Ihr Betriebssystem oder ihre Auflösung wird nicht unterstützt"
set $ExitCode$ = "1"
EndIf
Else
If ( $MSVersion$ = "5.1" )
If FileExists($Wallpaper_Src$)
comment "Ihr Standard-Wallpaper wird nun aktualisiert"
Files_Wallpaper_WinXP /SysNative
Registry_Wallpaper_WinXP /SysNative /AllNTUserDats
set $ExitCode$ = "0"
Else
comment "Ihr Betriebssystem oder ihre Auflösung wird nicht unterstützt"
set $ExitCode$ = "1"
EndIf
Else
comment "Ihr Betriebssystem oder ihre Auflösung wird nicht unterstützt"
set $ExitCode$ = "1"
EndIf
EndIf
Else
DosInAnIcon_Set_Max_Resolution
DosInAnIcon_Get_Horizontal
DosInAnIcon_Get_Vertical
Set $resolution$ = Trim (takeString(2,getOutStreamFromSection ('DosInAnIcon_Get_Horizontal'))) + "x" + Trim (takeString(2,getOutStreamFromSection ('DosInAnIcon_Get_Vertical')))
Set $Wallpaper_Src$ = $Wallpaper_Src_Dir$+$resolution$+".bmp"
Set $Wallpaper_WinXP_Dst$ = $Wallpaper_WinXP_Dst_Dir$+$resolution$+".bmp"
Set $Wallpaper_Win7_Dst$ = $Wallpaper_Win7_Dst_Dir$+$resolution$+".bmp"
If ( $MSVersion$ >= "6" )
If FileExists($Wallpaper_Src$)
comment "Ihr Standard-Wallpaper wird nun aktualisiert"
Files_Wallpaper_Win7 /SysNative
Registry_Wallpaper_Win7 /SysNative
set $ExitCode$ = "0"
Else
comment "Ihr Betriebssystem oder ihre Auflösung wird nicht unterstützt"
set $ExitCode$ = "1"
EndIf
Else
If ( $MSVersion$ = "5.1" )
If FileExists($Wallpaper_Src$)
comment "Ihr Standard-Wallpaper wird nun aktualisiert"
Files_Wallpaper_WinXP /SysNative
Registry_Wallpaper_WinXP /SysNative /AllNTUserDats
set $ExitCode$ = "0"
Else
comment "Ihr Betriebssystem oder ihre Auflösung wird nicht unterstützt"
set $ExitCode$ = "1"
EndIf
Else
comment "Ihr Betriebssystem oder ihre Auflösung wird nicht unterstützt"
set $ExitCode$ = "1"
EndIf
EndIf
EndIf
[DosInAnIcon_Get_Horizontal]
@echo off
wmic path win32_videocontroller get currentHorizontalResolution
[DosInAnIcon_Get_Vertical]
@echo off
wmic path win32_videocontroller get currentVerticalResolution
[DosInAnIcon_Get_Max_Resolution]
@echo off
"%scriptpath%\getmaxresolution.exe"
[DosInAnIcon_Set_Max_Resolution]
@echo off
"%scriptpath%\ResSwitch.exe" /WIDTH:$max_screen_horizontal$ /HEIGHT:$max_screen_vertical$ /updateregistry
[Files_Wallpaper_Win7]
delete -s -f "$Wallpaper_Win7_Dst_Dir$"
copy -s "$Wallpaper_Src_Dir$" "$Wallpaper_Win7_Dst_Dir$"
[Registry_Wallpaper_Win7]
OpenKey [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes]
Add "DesktopBackground" = "$Wallpaper_Win7_Dst$"
Set "DesktopBackground" = "$Wallpaper_Win7_Dst$"
Add "NoThemeInstall" = reg_dword:0x00000000
Set "NoThemeInstall" = reg_dword:0x00000000
Add "ThemeName" = "$Theme_Win7_Name$"
Set "ThemeName" = "$Theme_Win7_Name$"
Add "WindowColor" = "$Theme_Win7_WindowColor$"
Set "WindowColor" = "$Theme_Win7_WindowColor$"
[Files_Wallpaper_WinXP]
copy -s "$Wallpaper_Src_Dir$" "$Wallpaper_WinXP_Dst_Dir$"
[Registry_Wallpaper_WinXP]
OpenKey [Control Panel\Desktop]
Add "Wallpaper" = "$Wallpaper_WinXP_Dst$"
Set "Wallpaper" = "$Wallpaper_WinXP_Dst$"
[Files_Logon_Win7]
copy -s "$Logon_Src_Dir$" "$Logon_Win7_Dst_Dir$"
[Registry_Logon_Win7]
OpenKey [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication]
Add "OEMBackground" = reg_dword:0x00000001
Set "OEMBackground" = reg_dword:0x00000001
OpenKey [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System]
Add "UseOEMBackground" = reg_dword:0x00000001
Set "UseOEMBackground" = reg_dword:0x00000001