One of my customers asked me to change the default wallpaper for the users, the same wallpaper should be used for desktop, start screen and lock screen. Also a specific accent color scheme should be selected to be used on the start screen.
My first thought was to simply use the new Windows 8.1 Group Policy settings to force a specific lock screen and set the colors, but the customer had one more request:
“oh, by the way.. users must be able to change these to their own preference afterwards.”
So with that request the GPOs were out of play.
(If you are looking for the group policy settings for lock screen and color scheme, they can be found here Computer configuration\Policies\Administrative templates\Control Panel\Personalization.)
Replacing the wallpaper
After poking around for a while, looking at the old Windows 7 wallpaper registry values, sysprep OOBE options etc. I failed to find a suitable solution that would allow me to specify a custom wallpaper, so replacing the default Windows 8.1 wallpaper was the way to go.
First we need to create a wallpaper that has the following resolution, as that is the resolution of the image that we are replacing:
1920x1200px 72dpi 24bit color depth .jpg format.
The wallpaper is then added to a SCCM package along with a script to replace it.
Next is to create a script that will replace the existing wallpaper files in the following locations with our new wallpaper located in the package:
- C:\Windows\Web\Wallpaper\Windows\img0.jpg
- C:\Windows\Web\Screen\img100.jpg
By replacing the files just after applying the image, but before Windows minisetup, we can replace the files without having to deal with file security and copies in the winSxS folder that we would else have to battle with if executing the script in the running operating system.
Using desktop wallpaper as default for start screen
Now that we have replaced the wallpaper files we need to make some registry changes to force Windows to use the desktop wallpaper on the start screen as well.
Setting the following registry value to a decimal value of 219 does exactly that:
HKU\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent
- MotionAccentId_v1.00 = 219 (REG_DWORD)
Specifying default color scheme
Windows comes with a predefined set of colors schemes for the start screen:
By setting the following registry value to the decimal value of the color scheme we can preselect the scheme we want:
HKU\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent
- ColorSet_Version3 = <scheme value> (REG_DWORD)
If you prefer to create your own color scheme you can set the following registry values to specify the start and accent color.
HKU\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent
- AccentColor = <color value> (REG_DWORD)
- StartColor = <color value> (REG_DWORD)
To find the values you must set the colors as needed on a Windows 8.1 computer, an read the decimal value from the registry.
Overlay
If you prefer to use an overlay instead of the desktop wallpaper, you can set the following registry value to specify one of the overlays that come with Windows.
HKU\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent
- AccentId_v8.00 = <overlay value> (REG_DWORD)
The overlay can be any of these values:
The script
As I like to keep things in my task sequences, I created a vbscript that will replace wallpaper files and set the registry values in the default user profile at deployment time.
The script relies on the ZTIUtility.vbs file from the MDT toolkit, that must be placed in the same package as the script and the wallpaper file, which must be named Wallpaper.jpg.
In the task sequence add a Run Command Line step after the “Apply Operating System” step but before the “Setup Windows and Configuration manager” step.
Download the script here: [download id=”202″]
This is probably just one solution to the problem, I could have used Group Policy Preferences for setting the registry keys, but I like to keep things in my Task Sequences when possible, as this does not require involvement of the Active Directory guys etc.
One thing to remember, is that Windows 8.1 has to be activated before the desktop wallpaper will be used as background for the start screen, this is usually not a problem in the enterprise where KMS activation is in place.
I have struggled with this a bit and my situation ‘was’ similar to your customers. By noon today my build had a professional fit and finish. For that, sir – I thank you.
Thanx ….. it was really helpful
Thank you for this guide, it helped a lot.
You really make it appear so easy along with your presentation but
I find this topic to be actually something that I feel I might never understand.
It sort of feels too complicated and extremely vast for me.
I’m taking a look ahead to your subsequent publish, I’ll try to get the
hang of it!
Spot on with this write-up, I truly feel this web site needs far more attention. I’ll probably be returning
to read more, thanks for the information!
[…] Beste Idee: http://blog.coretech.dk/hra/change-default-windows-8-1-wallpaper-color-scheme-and-lock-screen-backgr… […]
This is great, but do you have instructions for using just MDT? I’m trying to get your script to run during just after the OS is installed, after Drivers are injected, and as the first action just after State Restore. I feel like I’m missing a permission, or some other action to go after NTUser.dat, but I just can’t rig the script to work right. The error I see often is Failure (1005):1: Loading Offline registry hive from : usersdefaultntuser.dat. Do you have another idea on that?
Thank you thank you for the inspiration on this script. I located another tech who had modified the Default User Hive and I combined your script and his into one PowerShell Script. The wallpaper.jpg file I used is the same background for all three: wallpaper, menu, and lock screen. I’m sure it could be modified for multiple backgrounds. I used this script during imaging with MDT, then captured that WIM file. Now when I image a machine, the WIM has these default settings already, even as Administrator. During the creation of the WIM, I applied my powershell script in Custom Tasks under State Restore – After Win PE. Even though the powershell script takes ownership of these files, after it reboots, the OS will supersede their ownership.
#Set Path to Execute from Folder
$Path = split-path -parent $MyInvocation.MyCommand.Path
#Add Branding for Wallpaper
#Import Menu Colors, Wallpaper, and Background Images to Default Users
Reg.exe load HKEY_Userstemphive c:usersdefaultntuser.dat
Reg.exe ADD HKEY_USERSTemphiveSoftwareMicrosoftWindowsCurrentVersionExplorerAccent /v MotionAccentId_v1.00 /t REG_DWORD /d 219 /f
Reg.exe ADD HKEY_USERSTemphiveSoftwareMicrosoftWindowsCurrentVersionExplorerAccent /v ColorSet_Version3 /t REG_DWORD /d 17 /f
Reg.exe ADD HKEY_USERSTemphiveSoftwareMicrosoftWindowsCurrentVersionExplorerAccent /v StartColor /t REG_DWORD /d 4287915038 /f
Reg.exe ADD HKEY_USERSTemphiveSoftwareMicrosoftWindowsCurrentVersionExplorerAccent /v AccentColor /t REG_DWORD /d 4291585609 /f
Reg.exe Unload HKEY_Userstemphive
#Import Image File to Default Wallpaper, Background, and Lock Image
takeown /f “c:Windowswebscreenimg100.jpg”
icacls “c:Windowswebscreenimg100.jpg” /grant Administrators:f
Rename-Item c:Windowswebscreenimg100.jpg img106.jpg
Copy-Item $pathwallpaper.jpg c:windowswebscreenimg100.jpg -force
takeown /f “c:Windowswebwallpaperwindowsimg0.jpg”
icacls “c:Windowswebwallpaperwindowsimg0.jpg” /grant Administrators:f
Rename-Item c:Windowswebwallpaperwindowsimg0.jpg img1.jpg
Copy-Item $pathwallpaper.jpg c:Windowswebwallpaperwindowsimg0.jpg -force
takeown /f “C:ProgramDataMicrosoftWindowsSystemData” /R /D Y
icacls “C:ProgramDataMicrosoftWindowsSystemData*” /grant Administrators:f /T
Rename-Item c:ProgramDataMicrosoftWindowsSystemDataS-1-5-18ReadOnlyLockScreen_ZLockScreen___1366_0768.jpg LockScreen___1366_0769.jpg
Copy-Item $pathwallpaper.jpg c:ProgramDataMicrosoftWindowsSystemDataS-1-5-18ReadOnlyLockScreen_ZLockScreen___1366_0768.jpg -force
Thanks again for the inspiration!
Thanks for this tutorial, but how can I replace those feminine wallpapers?
well, this post shows you how to create your own wallpaper file, and replace the original file in Windows. It is only if you specify the AccentID you will get the overlay. otherwise it is your own wallpaper that is used.
Happy new year!
do you have a tutorial for replacing the 14 default wallpapers? Because it’s only shows that on the 15th picture is my personal wallpaper (besides the solid one). It’s not showing my other downloaded wallpapers. Happy New Year too 🙂
oh i mean 19 images on personalize menu. the 20th is your personalize image.
KrojamSoft FilesSearch Tool helped me in this case.
[…] If you want to also change the colour scheme in Windows 8.1, there’s a nice post on the Coretech blog. […]
nice info man. really help me
[…] Change default Windows 8.1 wallpaper, color scheme and lock screen background […]
[…] Change default Windows 8.1 wallpaper, color scheme and lock screen background […]