Setting lockscreen and wallpaper based on resolution for Windows 8.1 during OSD
Lockscreen
First you need to create and name files in this convention (we used png files and renamed them to jpg - this somehow works)
LockScreen___2160_1440.jpg
LockScreen___1024_0768.jpg
We used the top 10 resolutions on client machines and also the Surface Pro 3 resolution
1680 x 1050
1920 x 1080
1280 x 1024
1366 x 768
1024 x 768
1600 x 900
1920 x 1200
1280 x 800
2560 x 1440
1600 x 1200
2160 x 1440
Notice each number is 4 characters.
During OSD run the following commands using a package with the images in it
xcopy /s LockScreen*.* C:ProgramDataMicrosoftWindowsSystemDataS-1-5-18ReadOnlyLockScreen_Z /y
xcopy /s LockScreen*.* C:ProgramDataMicrosoftWindowsSystemDataS-1-5-18ReadOnlyLockScreen_Y /y
xcopy /s LockScreen*.* C:ProgramDataMicrosoftWindowsSystemDataS-1-5-18ReadOnlyLockScreen_X /y
The reason for copying to 3 folders is that if the resolution changes it uses the next letter (Internet told me, haven't confirmed)
Wallpaper
Create a new package separate from the lockscreen package with the files above however with a new naming convention so the script below is happy
BackgroundDefault2160x1440.jpg
BackgroundDefault1024x768.jpg
and so on.
In your unattend.xml file Under Specializeamd64_Microsoft-Windows-Shell-Setup_neutralThemes
set DesktopBackground to "C:windowsWebWallpaperHappySCCMBackgroundDefault.jpg"
changing HappySCCM to your org/theme name.
In your package add the script https://send.estate/s?e=8d2b330455d4fcb
In your task sequence have 2 run commands using the package
xcopy /s *.jpg %windir%WebWallpaperHappySCCM /y
cscript.exe SetBackground.vbs
You can also modify the last section of the code, if the resolution doesn't match it uses the BackgroundDefault1920x1080.jpg, rename that to an image that scales well.
4 Comments
Trackbacks for this post
-
[…] for Windows 7, In Windows 8.1 you should do similiar but use the lockscreen – See the post on Windows 8.1 setting lockscreen and wallpaper for more […]
Thanks, nice.
But probably there's no possibility to dowload the script (https://send.estate/s?e=8d1b06d056fc82a) !?
Odd! Here's a new link https://send.estate/s?e=8d2b330455d4fcb
Thanks a lot !