Go Back   TechArena Community > Technical Support > Computer Help > Windows XP > Customize XP
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: ,

Using RegEdit to change desktop background

Customize XP


Reply
 
Thread Tools Search this Thread
  #1  
Old 18-09-2006
flint_and_steel
 
Posts: n/a
Using RegEdit to change desktop background

Using the key "HKEY_CURRENT_USER\Control Panel\Desktop" key, I am able to
change the value of the "Wallpaper" sub-key, but I cannot make the desktop
refresh itself with the new background. Is there a utility that I can run
using command lines (like from another program I have created) that will
refresh the desktop? If not, is there some other way to handle it?

[XP Pro SP2]

Thank you for your help!

Reply With Quote
  #2  
Old 18-09-2006
Ramesh, MS-MVP
 
Posts: n/a
Re: Using RegEdit to change desktop background

Method 1 - Courtesy of Torgeir Bakken, MVP.

Click Start, Run and type:

RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters

This command-line refreshes the desktop wallpaper (should be a .bmp file).

Method 2: Using a program that uses the "SystemParametersInfo" API call to
apply the desktop wallpaper dynamically. I wrote this program some time ago,
and you may use it if you're interested.

http://windowsxp.mvps.org/wprefresh.exe

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


"flint_and_steel" <flintandsteel@discussions.microsoft.com> wrote in message
news:E780F631-926F-4DB4-B027-F8BE5B456552@microsoft.com...
Using the key "HKEY_CURRENT_USER\Control Panel\Desktop" key, I am able to
change the value of the "Wallpaper" sub-key, but I cannot make the desktop
refresh itself with the new background. Is there a utility that I can run
using command lines (like from another program I have created) that will
refresh the desktop? If not, is there some other way to handle it?

[XP Pro SP2]

Thank you for your help!



Reply With Quote
  #3  
Old 18-09-2006
flint_and_steel
 
Posts: n/a
Re: Using RegEdit to change desktop background

It appears that the Windows Desktop Cutomization program automatically
converts a *.jpg or *.gif file to a bitmap before it is set as the desktop
background image. Is there a way to run the same process externally, through
command lines or the like? Is there any documentation that may help?

Thank you for your help!
- flint_and_steel

"Ramesh, MS-MVP" wrote:

> Method 1 - Courtesy of Torgeir Bakken, MVP.
>
> Click Start, Run and type:
>
> RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
>
> This command-line refreshes the desktop wallpaper (should be a .bmp file).
>
> Method 2: Using a program that uses the "SystemParametersInfo" API call to
> apply the desktop wallpaper dynamically. I wrote this program some time ago,
> and you may use it if you're interested.
>
> http://windowsxp.mvps.org/wprefresh.exe
>
> --
> Regards,
>
> Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
> Windows® XP Troubleshooting http://www.winhelponline.com
>
>
> "flint_and_steel" <flintandsteel@discussions.microsoft.com> wrote in message
> news:E780F631-926F-4DB4-B027-F8BE5B456552@microsoft.com...
> Using the key "HKEY_CURRENT_USER\Control Panel\Desktop" key, I am able to
> change the value of the "Wallpaper" sub-key, but I cannot make the desktop
> refresh itself with the new background. Is there a utility that I can run
> using command lines (like from another program I have created) that will
> refresh the desktop? If not, is there some other way to handle it?
>
> [XP Pro SP2]
>
> Thank you for your help!
>
>
>


Reply With Quote
  #4  
Old 18-09-2006
Ramesh, MS-MVP
 
Posts: n/a
Re: Using RegEdit to change desktop background

SystemParametersInfo:
http://msdn.microsoft.com/library/de...metersinfo.asp

<excerpt>
SPI_SETDESKWALLPAPER:

Sets the desktop wallpaper. The value of the pvParam parameter determines
the new wallpaper. To specify a wallpaper bitmap, set pvParam to point to a
null-terminated string containing the name of a bitmap file. Setting pvParam
to "" removes the wallpaper. Setting pvParam to SETWALLPAPER_DEFAULT or NULL
reverts to the default wallpaper.

</excerpt>

To save the image in .BMP format, here is an example for C# and VB2005
http://msdn.microsoft.com/coding4fun...2/default.aspx

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


"flint_and_steel" <flintandsteel@discussions.microsoft.com> wrote in message
news:E4021BC8-3B54-4125-8F65-79F20CBBF25F@microsoft.com...
It appears that the Windows Desktop Cutomization program automatically
converts a *.jpg or *.gif file to a bitmap before it is set as the desktop
background image. Is there a way to run the same process externally,
through
command lines or the like? Is there any documentation that may help?

Thank you for your help!
- flint_and_steel

"Ramesh, MS-MVP" wrote:

> Method 1 - Courtesy of Torgeir Bakken, MVP.
>
> Click Start, Run and type:
>
> RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
>
> This command-line refreshes the desktop wallpaper (should be a .bmp file).
>
> Method 2: Using a program that uses the "SystemParametersInfo" API call to
> apply the desktop wallpaper dynamically. I wrote this program some time
> ago,
> and you may use it if you're interested.
>
> http://windowsxp.mvps.org/wprefresh.exe
>
> --
> Regards,
>
> Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
> Windows® XP Troubleshooting http://www.winhelponline.com
>
>
> "flint_and_steel" <flintandsteel@discussions.microsoft.com> wrote in
> message
> news:E780F631-926F-4DB4-B027-F8BE5B456552@microsoft.com...
> Using the key "HKEY_CURRENT_USER\Control Panel\Desktop" key, I am able to
> change the value of the "Wallpaper" sub-key, but I cannot make the desktop
> refresh itself with the new background. Is there a utility that I can run
> using command lines (like from another program I have created) that will
> refresh the desktop? If not, is there some other way to handle it?
>
> [XP Pro SP2]
>
> Thank you for your help!
>
>
>




Reply With Quote
  #5  
Old 18-09-2006
Ramesh, MS-MVP
 
Posts: n/a
Re: Using RegEdit to change desktop background

BTW, the API information is for developers. I'm sorry to say that there is
no built-in command-line tool which can convert the images to .bmp. You need
a program to do it.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


"Ramesh, MS-MVP" <ramesh@XOX.mvps.org> wrote in message
news:uYE0Uv02GHA.3508@TK2MSFTNGP03.phx.gbl...
SystemParametersInfo:
http://msdn.microsoft.com/library/de...metersinfo.asp

<excerpt>
SPI_SETDESKWALLPAPER:

Sets the desktop wallpaper. The value of the pvParam parameter determines
the new wallpaper. To specify a wallpaper bitmap, set pvParam to point to a
null-terminated string containing the name of a bitmap file. Setting pvParam
to "" removes the wallpaper. Setting pvParam to SETWALLPAPER_DEFAULT or NULL
reverts to the default wallpaper.

</excerpt>

To save the image in .BMP format, here is an example for C# and VB2005
http://msdn.microsoft.com/coding4fun...2/default.aspx

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com



Reply With Quote
  #6  
Old 19-09-2006
Alec S.
 
Posts: n/a
Re: Using RegEdit to change desktop background

"flint_and_steel" <flintandsteel@discussions.microsoft.com> wrote in message
news:E780F631-926F-4DB4-B027-F8BE5B456552@microsoft.com...
> Using the key "HKEY_CURRENT_USER\Control Panel\Desktop" key, I am able to
> change the value of the "Wallpaper" sub-key, but I cannot make the desktop
> refresh itself with the new background. Is there a utility that I can run
> using command lines (like from another program I have created) that will
> refresh the desktop? If not, is there some other way to handle it?



If all you're looking for is a way to change the wallpaper from a script or the command line, then try Marty List's "Set Wallpaper".
It's perfect for this use.

Otherwise, you could use Ramesh's suggestion along with a program such as Image Alchemy, IrfanView, or some other program to convert
it to bitmap.


--
Alec S.
news/alec->synetech/cjb/net



Reply With Quote
  #7  
Old 19-09-2006
flint_and_steel
 
Posts: n/a
Re: Using RegEdit to change desktop background

And that's exactly what I was intending to use it for. I have implemented
the changes, and it works great! Still working on the bitmap conversion,
though.

Thank you so much for your help!!

Regards,
flint_and_steel

"Ramesh, MS-MVP" wrote:

> BTW, the API information is for developers. I'm sorry to say that there is
> no built-in command-line tool which can convert the images to .bmp. You need
> a program to do it.
>
> --
> Regards,
>
> Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
> Windows® XP Troubleshooting http://www.winhelponline.com
>
>
> "Ramesh, MS-MVP" <ramesh@XOX.mvps.org> wrote in message
> news:uYE0Uv02GHA.3508@TK2MSFTNGP03.phx.gbl...
> SystemParametersInfo:
> http://msdn.microsoft.com/library/de...metersinfo.asp
>
> <excerpt>
> SPI_SETDESKWALLPAPER:
>
> Sets the desktop wallpaper. The value of the pvParam parameter determines
> the new wallpaper. To specify a wallpaper bitmap, set pvParam to point to a
> null-terminated string containing the name of a bitmap file. Setting pvParam
> to "" removes the wallpaper. Setting pvParam to SETWALLPAPER_DEFAULT or NULL
> reverts to the default wallpaper.
>
> </excerpt>
>
> To save the image in .BMP format, here is an example for C# and VB2005
> http://msdn.microsoft.com/coding4fun...2/default.aspx
>
> --
> Regards,
>
> Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
> Windows® XP Troubleshooting http://www.winhelponline.com
>
>
>


Reply With Quote
  #8  
Old 19-09-2006
Donald A. Herman
 
Posts: n/a
Re: Using RegEdit to change desktop background

That's Cool

I've tried to use that API for refreshing the Run box after I clear the
History folder in IE then Merge a REG file with my preset entries. Would you
happen to know that parameter.

I hate waiting to restart for those commands to be available again.

--
Donald A. Herman
Software - Scheduler Pro, Disk Cataloger, Math Wizard
http://don_herman.tripod.com
Office Extras, Addins
http://don_herman.tripod.com/msoextras
..
..
"Ramesh, MS-MVP" <ramesh@XOX.mvps.org> wrote in message
news:uYE0Uv02GHA.3508@TK2MSFTNGP03.phx.gbl...
> SystemParametersInfo:
> http://msdn.microsoft.com/library/de...metersinfo.asp
>
> <excerpt>
> SPI_SETDESKWALLPAPER:
>
> Sets the desktop wallpaper. The value of the pvParam parameter determines
> the new wallpaper. To specify a wallpaper bitmap, set pvParam to point to
> a
> null-terminated string containing the name of a bitmap file. Setting
> pvParam
> to "" removes the wallpaper. Setting pvParam to SETWALLPAPER_DEFAULT or
> NULL
> reverts to the default wallpaper.
>
> </excerpt>
>
> To save the image in .BMP format, here is an example for C# and VB2005
> http://msdn.microsoft.com/coding4fun...2/default.aspx
>
> --
> Regards,
>
> Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
> Windows® XP Troubleshooting http://www.winhelponline.com
>
>
> "flint_and_steel" <flintandsteel@discussions.microsoft.com> wrote in
> message
> news:E4021BC8-3B54-4125-8F65-79F20CBBF25F@microsoft.com...
> It appears that the Windows Desktop Cutomization program automatically
> converts a *.jpg or *.gif file to a bitmap before it is set as the desktop
> background image. Is there a way to run the same process externally,
> through
> command lines or the like? Is there any documentation that may help?
>
> Thank you for your help!
> - flint_and_steel
>
> "Ramesh, MS-MVP" wrote:
>
>> Method 1 - Courtesy of Torgeir Bakken, MVP.
>>
>> Click Start, Run and type:
>>
>> RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
>>
>> This command-line refreshes the desktop wallpaper (should be a .bmp
>> file).
>>
>> Method 2: Using a program that uses the "SystemParametersInfo" API call
>> to
>> apply the desktop wallpaper dynamically. I wrote this program some time
>> ago,
>> and you may use it if you're interested.
>>
>> http://windowsxp.mvps.org/wprefresh.exe
>>
>> --
>> Regards,
>>
>> Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
>> Windows® XP Troubleshooting http://www.winhelponline.com
>>
>>
>> "flint_and_steel" <flintandsteel@discussions.microsoft.com> wrote in
>> message
>> news:E780F631-926F-4DB4-B027-F8BE5B456552@microsoft.com...
>> Using the key "HKEY_CURRENT_USER\Control Panel\Desktop" key, I am able to
>> change the value of the "Wallpaper" sub-key, but I cannot make the
>> desktop
>> refresh itself with the new background. Is there a utility that I can
>> run
>> using command lines (like from another program I have created) that will
>> refresh the desktop? If not, is there some other way to handle it?
>>
>> [XP Pro SP2]
>>
>> Thank you for your help!
>>
>>
>>

>
>




Reply With Quote
  #9  
Old 19-09-2006
Ramesh, MS-MVP
 
Posts: n/a
Re: Using RegEdit to change desktop background

No idea how to clear the RunMRU dynamically. AFAIK, it uses an undocumented
API. Perhaps you can check with the SDK groups for more information. Dirty
way is to kill explorer.exe and restart it, but it may close all instances
of Internet Explorer also, depending upon how the system is configured.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


"Donald A. Herman" <dherman13@netzero.com> wrote in message
news:ehIoif42GHA.4524@TK2MSFTNGP06.phx.gbl...
That's Cool

I've tried to use that API for refreshing the Run box after I clear the
History folder in IE then Merge a REG file with my preset entries. Would you
happen to know that parameter.

I hate waiting to restart for those commands to be available again.

--
Donald A. Herman
Software - Scheduler Pro, Disk Cataloger, Math Wizard
http://don_herman.tripod.com
Office Extras, Addins
http://don_herman.tripod.com/msoextras
..



Reply With Quote
  #10  
Old 19-09-2006
Ramesh, MS-MVP
 
Posts: n/a
Re: Using RegEdit to change desktop background

You're welcome, flint_and_steel.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


"flint_and_steel" <flintandsteel@discussions.microsoft.com> wrote in message
news:0DD2A0B4-6ADF-4E20-AD1E-8C7441BB5ECC@microsoft.com...
And that's exactly what I was intending to use it for. I have implemented
the changes, and it works great! Still working on the bitmap conversion,
though.

Thank you so much for your help!!

Regards,
flint_and_steel

"Ramesh, MS-MVP" wrote:




Reply With Quote
  #11  
Old 20-09-2006
Donald A. Herman
 
Posts: n/a
Re: Using RegEdit to change desktop background

> way is to kill explorer.exe and restart it, but it may close all instances
> of Internet Explorer also, depending upon how the system is configured.


Yeah it does.

If I wait to close the "Internet Properties" after the merge the MRU is
refreshed with my items! So I know there is a way. Thanks though.

--
Donald A. Herman
Software - Scheduler Pro, Disk Cataloger, Math Wizard
http://don_herman.tripod.com
Office Extras, Addins
http://don_herman.tripod.com/msoextras
..
..
"Ramesh, MS-MVP" <ramesh@XOX.mvps.org> wrote in message
news:%23c1agf%232GHA.988@TK2MSFTNGP02.phx.gbl...
> No idea how to clear the RunMRU dynamically. AFAIK, it uses an
> undocumented
> API. Perhaps you can check with the SDK groups for more information. Dirty
> way is to kill explorer.exe and restart it, but it may close all instances
> of Internet Explorer also, depending upon how the system is configured.
>
> --
> Regards,
>
> Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
> Windows® XP Troubleshooting http://www.winhelponline.com
>
>
> "Donald A. Herman" <dherman13@netzero.com> wrote in message
> news:ehIoif42GHA.4524@TK2MSFTNGP06.phx.gbl...
> That's Cool
>
> I've tried to use that API for refreshing the Run box after I clear the
> History folder in IE then Merge a REG file with my preset entries. Would
> you
> happen to know that parameter.
>
> I hate waiting to restart for those commands to be available again.
>
> --
> Donald A. Herman
> Software - Scheduler Pro, Disk Cataloger, Math Wizard
> http://don_herman.tripod.com
> Office Extras, Addins
> http://don_herman.tripod.com/msoextras
> .
>
>




Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows XP > Customize XP


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads for: "Using RegEdit to change desktop background"
Thread Thread Starter Forum Replies Last Post
I can't change my desktop background Swtboodie01 Windows Vista Performance 17 26-07-2008 03:57 AM
Change Desktop Background denz Vista Help 4 18-01-2008 09:46 PM
Can't change desktop background cjwilson2740 Windows XP Support 4 30-11-2007 03:22 AM
***Can't Change Desktop Background*** jerome89 Vista Help 1 29-10-2007 09:16 AM
can't change desktop background cliff kubicek Customize XP 2 19-04-2007 07:40 PM


All times are GMT +5.5. The time now is 04:23 AM.