Can we change the desktop wallpaper in windows XP using Registry

Discussion in 'Software Q&A' started by sridatta, Aug 7, 2006.

Thread Status:
Not open for further replies.
  1. sridatta

    sridatta An Esoteric Geek

    Joined:
    Mar 28, 2006
    Messages:
    283
    Likes Received:
    15
    Trophy Points:
    0
    Location:
    Bangalore
    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
     
  2. Vishal Gupta

    Vishal Gupta Microsoft MVP

    Joined:
    Jul 28, 2005
    Messages:
    5,173
    Likes Received:
    121
    Trophy Points:
    0
    Location:
    AskVG.com
    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.
     
  3. OP
    sridatta

    sridatta An Esoteric Geek

    Joined:
    Mar 28, 2006
    Messages:
    283
    Likes Received:
    15
    Trophy Points:
    0
    Location:
    Bangalore
    ye.. i tried all the possiblitites.. even then.. the wall paper is not changing...
     
  4. Vishal Gupta

    Vishal Gupta Microsoft MVP

    Joined:
    Jul 28, 2005
    Messages:
    5,173
    Likes Received:
    121
    Trophy Points:
    0
    Location:
    AskVG.com
    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!
     
  5. OP
    sridatta

    sridatta An Esoteric Geek

    Joined:
    Mar 28, 2006
    Messages:
    283
    Likes Received:
    15
    Trophy Points:
    0
    Location:
    Bangalore
    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 ???
     
  6. Vishal Gupta

    Vishal Gupta Microsoft MVP

    Joined:
    Jul 28, 2005
    Messages:
    5,173
    Likes Received:
    121
    Trophy Points:
    0
    Location:
    AskVG.com
    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?
     
  7. OP
    sridatta

    sridatta An Esoteric Geek

    Joined:
    Mar 28, 2006
    Messages:
    283
    Likes Received:
    15
    Trophy Points:
    0
    Location:
    Bangalore
    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..
     
  8. Vishal Gupta

    Vishal Gupta Microsoft MVP

    Joined:
    Jul 28, 2005
    Messages:
    5,173
    Likes Received:
    121
    Trophy Points:
    0
    Location:
    AskVG.com
    OK! Now I got it...
    Try to change the value of OriginalWallpaper to the BMP path...
     
  9. OP
    sridatta

    sridatta An Esoteric Geek

    Joined:
    Mar 28, 2006
    Messages:
    283
    Likes Received:
    15
    Trophy Points:
    0
    Location:
    Bangalore
    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...
     
  10. Vishal Gupta

    Vishal Gupta Microsoft MVP

    Joined:
    Jul 28, 2005
    Messages:
    5,173
    Likes Received:
    121
    Trophy Points:
    0
    Location:
    AskVG.com
    It means now the wallpaper is changing!
    To change them instantaneously, give following command:

    RUNDLL32.EXE USER32.DLL,UpdatePerUserSystemParameters ,1 ,True
     
  11. OP
    sridatta

    sridatta An Esoteric Geek

    Joined:
    Mar 28, 2006
    Messages:
    283
    Likes Received:
    15
    Trophy Points:
    0
    Location:
    Bangalore
    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..??
     
    Last edited: Aug 9, 2006
  12. Vishal Gupta

    Vishal Gupta Microsoft MVP

    Joined:
    Jul 28, 2005
    Messages:
    5,173
    Likes Received:
    121
    Trophy Points:
    0
    Location:
    AskVG.com
    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
     
  13. OP
    sridatta

    sridatta An Esoteric Geek

    Joined:
    Mar 28, 2006
    Messages:
    283
    Likes Received:
    15
    Trophy Points:
    0
    Location:
    Bangalore
    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..?
     
    Last edited: Aug 9, 2006
  14. Vishal Gupta

    Vishal Gupta Microsoft MVP

    Joined:
    Jul 28, 2005
    Messages:
    5,173
    Likes Received:
    121
    Trophy Points:
    0
    Location:
    AskVG.com
    Thats what the key does! :D
    It restricts the user to change the wallpaper!
     
  15. OP
    sridatta

    sridatta An Esoteric Geek

    Joined:
    Mar 28, 2006
    Messages:
    283
    Likes Received:
    15
    Trophy Points:
    0
    Location:
    Bangalore
    sorry vishal.. i am able to change to change the wallpaper even after adding the key...
    it was a typographical error.. really very sorry..
     
  16. Vishal Gupta

    Vishal Gupta Microsoft MVP

    Joined:
    Jul 28, 2005
    Messages:
    5,173
    Likes Received:
    121
    Trophy Points:
    0
    Location:
    AskVG.com
    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!
     
  17. OP
    sridatta

    sridatta An Esoteric Geek

    Joined:
    Mar 28, 2006
    Messages:
    283
    Likes Received:
    15
    Trophy Points:
    0
    Location:
    Bangalore
    Vishal.. once more.. i have succeded... :) and hence u too :D
    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
     
    Last edited: Aug 9, 2006
  18. Vishal Gupta

    Vishal Gupta Microsoft MVP

    Joined:
    Jul 28, 2005
    Messages:
    5,173
    Likes Received:
    121
    Trophy Points:
    0
    Location:
    AskVG.com
    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
     
Thread Status:
Not open for further replies.

Share This Page