Setting lockscreen and wallpaper based on resolution for Windows 8.1 during OSD



First you need to create and name files in this convention (we used png files and renamed them to jpg - this somehow works)

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)



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
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.

Settings for theme

Settings for theme

In your package add the script

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.



  1. Thanks, nice.
    But probably there's no possibility to dowload the script ( !?

Trackbacks for this post

  1. […] 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 […]

Leave a Comment

Your email address will not be published. Required fields are marked *