Wednesday, October 13, 2010

How to change the wallpaper in Windows 7 Starter Edition

By design this feature is locked out by Microsoft (Shame on you!). If you still want to change it though you will need to do some registry work with permissions.

In a nutshell, “\\HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper” is the registry location where Windows stores the file name to use as the wallpaper image (for those of you who don’t know, the Registry is simply a place where Windows stores all of the configuration details for every single aspect of Windows, and can be viewed with the program RegEdit.exe). The default value for the wallpaper is “%windir%\web\wallpaper\windows\img0.jpg” (where %windir% is shorthand for your Windows directory, usually c:\windows\). Also by default, this image file is protected and this registry entry is protected. However, you can override these protections by changing the owner of the file and the owner of the “Desktop” branch of the registry.

The reason why people get a black screen after they change either the image, or the image file name in the registry, is because the windows DLL responsible for displaying the wallpaper checks if its the original image file or not. If its not, it clears the wallpaper entry in the registry (resulting in no image being displayed on the desktop, leaving it black). The solution then, is to make the registry entry read only, so that windows cant change the registry entry to an empty value again if the image file is different from the original.

Make sense so far?

So, the easiest solution is this:

Go to the “c:\windows\web\wallpaper\windows\” folder, and rename the img0.jpg file to something else (a backup), and then copy your desired wallpaper image file to this folder, and rename it to img0.jpg. Then open regedit.exe and go to the “\\HKEY_CURRENT_USER\Control Panel\Desktop\” branch. Right click on “Desktop” in this branch and select Permissions from the pop-up menu. Click on the Advanced button, go to the Owner tab, and select your login user name from the list of possible owners. Click OK, and then OK again to close the Permissions dialog. Now go back into the Permissions dialog (with yourself now as the owner of this registry branch). Click on the Advanced button again, and now click on the Add… button. Enter “Everyone” and press OK, you’ll get a list of permissions to choose from next, select the last one Read Control, and press OK. Finally select your user name from the same list of “Permission Entries” / “user names”, and press the Edit button. This is the most important step … from the list of permissions, make sure that Full Control, Set Value, Delete, Write DAC, and Write Owner are NOT selected. Clear them if they are, and press OK. Before you close the Advanced dialog, make sure the “Include inheritable permissions from this objects parent” is NOT checked, and press OK to close the Advanced dialog, and then OK again to close the Permissions dialog.

You are done. Now close regedit, and restart Windows, you should now have your own desktop wallpaper :)

If one day you want to change your wallpaper, simply replace the img0.jpg file with the wallpaper image you want. To make this easier in the future, you can add the “c:\windows\web\wallpaper\windows\” folder to your Pictures Library, so its more easily accessible when you go to My Picutres. You could alternatively change the wallpaper path in the registry again, but you would have to first set Full Control permissions against your user name, and then make it Read Only again afterwards. Just replacing the existing image is probably a simpler solution for most.

So there you have it. Its perhaps not the most convenient/elegant solution for those without a bit of technical know-how, but it does work, without extra programs or spending money to upgrade.