# Can we change the desktop wallpaper in windows XP using Registry



## sridatta (Aug 7, 2006)

Hi Guyz...

I tried to change my desktop wallpaper by replacing the registry key
HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper

but.. no matter which wall paper has been set, the key value remains same i.e. "C:\Documents and Settings\Sridatta Chegu\Local Settings\Application Data\Microsoft\Wallpaper1.bmp"

also.. i couldnot find any .bmp files in the above folder path. 

I also tried to change the key 
HKEY_CURRENT_USER\Control Panel\Desktop\ConvertedWallpaper 
which contain the exact file path of the current wall paper.. but it didnot work

Plss help me out.

Thanks


----------



## Vishal Gupta (Aug 7, 2006)

Did u set the value of *HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper* to a *BMP* file address?
Coz u can set oinly BMP files as wallpaper, otheriwse windows automatically convert those images into BMP file and its saved at *C:\Documents and Settings\Sridatta Chegu\Local Settings\Application Data\Microsoft\Wallpaper1.bmp*.


----------



## sridatta (Aug 7, 2006)

ye.. i tried all the possiblitites.. even then.. the wall paper is not changing...


----------



## Vishal Gupta (Aug 8, 2006)

*ConvertedWallpaper* contains the path to the JPG or other format files, which r converted to BMP when U apply them as wallpaper!
U can change the wallpaper directly by changing the *HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper* key! It works for me!


----------



## sridatta (Aug 8, 2006)

When i changed the key 
HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper 
my desktop backgnd didnot change even if i set a bmp image

when i right click my desktop and browse properties, then i observe the new wall paper there in desktop tab. but my desktop background is still the same old one..

did i miss any other steps ???


----------



## Vishal Gupta (Aug 8, 2006)

Tell me one thing!
Are u able to change the desktop wallpaper using other methods, like right-clicking on the image and select "set as wallpaper" or from Desktop properties?


----------



## sridatta (Aug 8, 2006)

ya, i m able to change through other methods. 
I m writing a code in batch file in which i need to change the wallpaper through command line. I was able to change the registry keys but the wall paper is not changing.. so i m trying 4 that..


----------



## Vishal Gupta (Aug 8, 2006)

OK! Now I got it...
Try to change the value of *OriginalWallpaper* to the BMP path...


----------



## sridatta (Aug 8, 2006)

Ya.. i changed the value of OriginalWallpaper and the Wallpaper.. but the wall paper didnot change instantaneously... 
But...When i tried to hide my icons and show them again.. then the wallpaper has changed... The wallpaper has changed even after restarting the system.. But it is not changing instantaneoulsy...


----------



## Vishal Gupta (Aug 8, 2006)

It means now the wallpaper is changing!
To change them instantaneously, give following command:

*RUNDLL32.EXE USER32.DLL,UpdatePerUserSystemParameters ,1 ,True*


----------



## sridatta (Aug 8, 2006)

Vishal.. I have done it..  U r really superb.. very thank u 4 ur help..
bye

Vishal.. I have one more query to ask...
If i dont want to allow the user to change the wallpaper.. is there ny way to do that..??


----------



## Vishal Gupta (Aug 9, 2006)

Try this!
In regedit, goto:

*HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer*

In right-side pane, create DWORD value *NoChangingWallpaper* and set it to *1*


----------



## sridatta (Aug 9, 2006)

The attachment shows the right side part of the key
*HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer*
I have added the key as you said but i m unable to change the wallpaper.. do i need to do anything else..?


----------



## Vishal Gupta (Aug 9, 2006)

Thats what the key does!  
It restricts the user to change the wallpaper!


----------



## sridatta (Aug 9, 2006)

sorry vishal.. i am able to change to change the wallpaper even after adding the key...
it was a typographical error.. really very sorry..


----------



## Vishal Gupta (Aug 9, 2006)

OK!
Try this: In

*HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System*

Create a String value *Wallpaper* and change its value to the location of any BMP file, u want. After that only the wallpaper u set in the value is displayed!


----------



## sridatta (Aug 9, 2006)

Vishal.. once more.. i have succeded...   and hence u too 
thank u once again....

one small note.. no matter what value u type in the key.. the desktop tab is disabled in display properties and the current wallpaper cannot be changed.

the prlbm is solved. moderators please close the thread


----------



## Vishal Gupta (Aug 9, 2006)

U r welcome!

U can also disable the Desktop tab, by going to:

*HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System*

And in right-side pane, create a DWORD value *NoDispBackgroundPage* and set its value to *1*.

And if u want to disable the Whole Properties dialog box, so that the user can't access it by right-clicking on desktop & select Properties. Goto:

*HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System*

And create DWORD value *NoDispCPL* and set its value to *1*


----------

