I connected my machine to a work group. The settings to change the wallpaper is in server machine, so that all the machine will have same wallpaper. Now how can I change my machine's wallpaper using registry ?

After reading some answers,

I created Wall.reg with the following content, and created a shortcut in Start up folder, so that the file will be executed automatically.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\Desktop]
"Wallpaper"="C:\Users\Public\Pictures\Sample Pictures\Koala.jpg"

Am I missing anything ? It is not working :(

  • 1
    Try using double slashes in wallpaper path.
    – thane
    Jan 16, 2012 at 14:02

8 Answers 8


Navigate to

HKEY_CURRENT_USER\Control Panel\Desktop

and change Wallpaper key value to the full path of your image.

  • 9
    And every time you logon the GPO will reset your wallpaper to the original.
    – Joe Taylor
    Jan 16, 2012 at 11:52
  • 1
    @JoeTaylor - Not if, instead of changing the path, you find the Path and replace the image with the image you want, but with the same name. :)
    – Suamere
    Jul 17, 2015 at 20:42
  • 1
    @Suamere - Which if it's server hosted (which it should be) would be impossible for a normal user.
    – Joe Taylor
    Jul 19, 2015 at 8:35

I know this is an old tread, and Windows 7 is an OS fast becoming obsolete. But for the occasional user: I have dealt with this for years in my shop. I am close enough to IT to have certain privileges on my laptop, but not close enough to stop then making stupid GPOs which - of course - affects me as well.

On XP I am certain, on Windows 7 this is just an inspiration: This kind of changes to Registry will not take effect until you reboot the system! And since you try to circumvent a GPO, this equals "mission impossible" in many situations. There are, however, a way to force an update of the Registry to be applied without rebooting...

The thing is: You don't need to reboot - you need to flush the cashe of registry settings - which is a part of a reboot.

Solution (on XP at least):

@echo off
call :quiet>nul 2>&1
goto :EOF
:: Configure Wallpaper (command prompt method works only with bmp files)
REG ADD "HKEY_CURRENT_USER\Control Panel\Desktop" /V Wallpaper /T REG_SZ /F /D "C:\WINDOWS\Web\Wallpaper1.bmp" 
REG ADD "HKCU\Control Panel\Desktop" /V WallpaperStyle /T REG_SZ /F /D 0
REG ADD "HKCU\Control Panel\Desktop" /V TileWallpaper /T REG_SZ /F /D 1
:: Make the changes effective immediately (only XP-compatible)
RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters

This works (worked) well for me on my XP machine, the trick being the last line: Execute "user32.dll,UpdatePerUserSystemParameters" as part of the bat-file. This takes the place of a "reboot". :-)

I put this in the Start folder, and added a shortcut key combination to the bat file: This way, my pc started with my own wallpaper, and when the GPO refreshes a couple of times during the day, I hit the shortcut key, and get my preferred view back (Which is infinitely prettier than the "black screen of depression" which is company stock) ;-)

I haven't got around to fix this on my new laptop (running Win 7) yet, but I guess someone out there can get inspired by this (XP) behavior and research further.

  • 1
    @Ramhound - Well, down-voting it is a little rash, if you ask me! Of course, I haven't - otherwise I would have said so - and not writing "I haven't got around to fix this on my new laptop (running Win 7) yet, but I guess someone out there can get inspired by this (XP) behavior and research further." I came across this page looking for a way to do this on my Win 7 box... and had you had a little patience, you would have seen my update to come next...
    – Hansjp
    Aug 22, 2015 at 12:28
  • I just deleted my comments to avoid unnecessary pings
    – Ramhound
    Aug 3, 2017 at 2:21

For those of you out there still dealing with XP boxes, I leave my previous answer intact.

However, I can now share an approach to solve the problem on a Windows 7 box:

  1. As I said before, you don't want to reboot the pc, because you are
    battling a Group Policy which is enforced on reboot (and in my
    personal case, every few hours during the day). However, changes to
    the registry need a flush of cashed settings before they become
    active. A reboot does that.

We need to find another way of accomplishing the target: "change-background-of-a-windows-7-machine..." - I skip the "using-registry" part, because I don't think it is possible, and frankly, I don't think it is the right approach on Windows 7! It was on XP - as I have stated in my previous answer.

The magic word now is "Themepack" - and the magic knowledge is: "It is executable!" What you need is an automated method of executing it and dealing with its embedded consequences.

  1. I use AutoHotkey version 1.1 (http://ahkscript.org/) for a number of things on my laptop, and if you have the permissions necessary for running this program, you are good to go:
  2. (Assuming you do nothing else with AutoHotkey): Create a txt file, name it anything but give it an ".ahk" file name extension instead of ".txt", and save it to the Startup folder ("C:\Users\ insert your username \AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup" in my case). Now it will run at every startup.

Edit the file using Notepad or similar tool: Insert these lines:

    ; Setting wallpaper on the desktop on Win 7 which is: Apply a Themepack!
     Run "C:\Laptop theme.themepack"  ; Apply your Themepack
     WinWait Personlige indstillinger ; Wait for the window to get focus (the appearance is mandatory on an "apply" command)
     WinClose                         ; Close the last found window

Note that I not only run the code at Startup, I also attach a hotkey (LCTRL+LSHIFT+D), which executes this part of the script at will.

Note also the command line "WinWait": My system is Danish, so the title of my Personalization window is "Personlige indstillinger". You need to insert here the title of the window on your own system. Read AHK help files how to do so, if it isn't obvious enough for you to guess it right to begin with.

  1. Now, all which remains is to Personalize your Windows 7 Laptop once and for all (unless a Group Policy prevents you (users) from changing things, you can always change things). When you are satisfied, save the resulting Themepack on the path you gave in the script (i.e. "C:\Laptop theme.themepack"), and done.

  2. Note: If you can't save anything on "C:\" then you can put the themepack anywhere - including in your personal user folders. The advantage of this is that you keep the script even when IT department is changing your laptop - provided they care to backup your user folders. My personal taste is just to keep things short, and I don't like connecting to network shares during startup if I can help it. Which I can.

  • 1
    And of course.. the obvious always hide in plain sight! You can simply save the Themepack in the Startup folder!... That is all the "autoexecute on startup" you want. I believe by rule this will always execute after the GPOs - it is at least on my system. The only drawback: You need to manually close the settings-window, when you don't script that part. But it saves you the hazzle of AutoHotkey, so I guess its worth mentioning.
    – Hansjp
    Aug 22, 2015 at 14:17
  • So... how does on create a Themepack? Nov 26, 2018 at 9:51
  • 1
    You can't help but having one. Windows build one for you when you boot up the operating system. If you make changes to, say, the desktop image, a "non-saved theme" will appear on its own. All you need to do is to 1) save it to get the file, and 2) copy the file to a placering where it stays. To find it: right-click the desktop, choose Personal settings.
    – Hansjp
    Nov 27, 2018 at 10:15

If the Server controls your wallpaper via a GPO then you will have to reset your wallpaper every time you login or the GPO is updated on your machine.

You could create a reg file modifying the values correctly and save it on your desktop, making this run at every logon would give you the wallpaper you desire after every logon. Use the registry Key that Thane provides and export the correct value. Anytime you import this it will modify the registry to the value you want.

Things to consider:

Are you breaking company IT policy doing this?
Can you modify the registry? and create startup tasks to do so? i.e do you have the priveleges?
Is it worth the hassle?

  • I can edit the registry. Can you give me idea about how can I create reg file and all. ?
    – Rauf
    Jan 16, 2012 at 12:06
  • Please see my edit.
    – Rauf
    Jan 16, 2012 at 12:39
  • If you just import the registry key manually. i.e double clicking on it. Does it work?
    – Joe Taylor
    Jan 16, 2012 at 13:41
  • No. It is not working.
    – Rauf
    Jan 17, 2012 at 9:47
  • I would definitely consider speaking to your IT department about this. there are a number of GP settings that can change / prevent a user from changing the wallpaper. if they've done this for a reason you could find yourself in hot water for messing around in the registry and changing it.
    – Joe Taylor
    Jan 17, 2012 at 10:40

Just save your 'koala' wallpaper over the default wallpaper file your policy is using.

  • This file is probably not world-writable, and the OP does not say that he has administrative privileges. Mar 24, 2015 at 12:50
  • Worked for me, but you're right, it may not work for him.
    – MattPark
    Mar 25, 2015 at 1:27

Have just been trying this. When you copy a user to the default user it keeps a hardcoded path to the originals users themes area so I was trying to change the original users background to a commonly available area.

I found you need to put double backslashes "\\" on the path ie. "C:\\Users\\....." otherwise the .reg entry is ignored!


Probably not the answer for everyone in every case, but it's worth ruling out: you have to log off and log back in for the setting to take effect. (This is, as others have noted, not going to help if you're fighting GPO, because that is going to set it right back.)

On my Win7 setup, I was setting HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper to some image and this would do nothing to the actual desktop background, though in Control Panel -> Personalization it would look like the setting had taken hold. This was driving me crazy until I realized that logging out and back in would make the new wallpaper take hold.

Update 9/8: This doesn't answer the OP's question in that it doesn't only use the registry, but as a follow-up, I never did find a satisfactory way to change the wallpaper using just the registry. If you can write and deploy some code, I found that a Win32 call to SystemParametersInfo with the SPI_SETDESKWALLPAPER flag made the wallpaper take effect immediately without the logout/login dance. See this answer for details. Again, it's not going to help if you're battling GPO for control over that setting.

  • You mention the problem having to log out of the user in order to apply the setting, yet if you do that, GPO takes affect but make no mention of how to handle that.
    – Ramhound
    Aug 21, 2015 at 19:55
  • Sorry, I tried to mention in my answer that this is only helpful when you don't have GPO overriding the setting. Sep 8, 2015 at 14:05
  • Also, this may or may not help in your situation, but it's worth following up on - I never did find a satisfactory way to change the wallpaper using only the registry. I ended up settling on a solution that used a Win32 call to SystemParametersInfo. See: stackoverflow.com/questions/1061678/… Sep 8, 2015 at 14:21
  • Updated my answer. Sep 8, 2015 at 14:36
  • Ramhound: I updated my answer in exactly the way that you asked for, but you deleted your comments and converted to a downvote. Can we talk it out in chat? I'm honestly trying to be helpful here with what little I can contribute. Sep 8, 2015 at 14:45

I realize this is old. I have however had to resolve this very issue, and the way to do it is a bit sneaky.

Set the registry entry to point to the settings you want, then set the permissions on them to allow every one read, but block anyone (including system) from having permissions to change it.

When the GPO goes to process it, it will get an access denied for that specific setting, and you your therefore stuck with the desired settings.

If the file is on your local system, don't use the same file name, unless you also do this trick for the actual image, otherwise the policy may overwrite you file.

  • 1
    Maybe I need more coffee, but isn't this the opposite of what the question asks about?
    – fixer1234
    Aug 3, 2018 at 0:59
  • ...and doesn't actually provide a solution, just some explanation.
    – not2qubit
    Dec 20, 2018 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.