In Microsoft Windows, the easiest way to change the background wallpaper is to right-click anywhere on the desktop, select “Properties”, and so on. But did you know you can also do that from the command line or by entering a series of commands in the command prompt. The only difference is that when you do it with GUI or you perform it on your desktop, you can use different file formats for the wallpaper image. But when you do it in the command line, the file format of the wallpaper image is limited to BMP only (.bmp). You cannot use other file types such as PNG, JPG, or GIF.
Now, here’s how you do it. First, prepare an image in bitmap format (.bmp). If you don’t have BMP files, you can convert any JPG or PNG files into BMP format using Adobe Photoshop. To convert an image into BMP format, launch Photoshop and load the image file. Next, click “File” and then “Save As”.
In the “Save As” dialog, select “BMP (*.BMP;*.RLE;*.DIB)” from the “Format” dropdown menu and click “Save”.
You now have a BMP image file. Now, the next thing to do is to add that BMP image to the registry by editing the registry key. First, take note of the BMP file’s exact path for example, “d:\bmp\skyscraper.bmp”. Once you have the path, launch an elevated command prompt. Click “Start”, “All Programs”, “Accessories” then right-click “Command Prompt” and select “Run as administrator”. In the command prompt, type the following command then hit Enter:
reg add “HKEY_CURRENT_USER\Control Panel\Desktop” /v Wallpaper /t REG_SZ /d d:\bmp\skyscraper.bmp /f
Replace “d:\bmp\skyscraper.bmp” with the correct path to your file. This command will only add the image to the registry but will not actually change the current wallpaper. Now, to make the change happen, run the following command then hit Enter:
rundll32 user32.dll,UpdatePerUserSystemParameters
This should make the changes to your desktop and replace your existing wallpaper with the BMP image you selected. This method was tested and worked on Microsoft Windows XP. Unfortunately, if you are using Microsoft Windows 7, the “rundll32” command might not work and update your current wallpaper. As a workaround, log off then log in back to apply the changes.