Tom's Hardware > Forum > Windows XP > Configuration & Customize > can a .bat file change the desktop wallpaper

can a .bat file change the desktop wallpaper

Forum Windows XP : Configuration & Customize - can a .bat file change the desktop wallpaper

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

Archived from groups: microsoft.public.windowsxp.customize (More info?)

 

I am trying to create a bat file that when executed will change the wallpaper
of the user immediatly. i have been able to change it is permanently in the
registry but i want to be ble to change it just by executing the bat file.
please help. any ideas would be appreciated.

Sponsored Links
Register or log in to remove.

Archived from groups: microsoft.public.windowsxp.customize (More info?)

 

Weell!!

I am a novice at altering the registry, but I have gleaned a few pointers
from sites such as Kelly's

Why not put the appropriate Registry commands in a .reg file. Then if you
execute it (double click) it will update the Registry for you.

Here is a file (ultraedit.reg) I got from who knows where, to add UltraEdit
as a editor for use in IE

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\UltraEdit]
@="UltraEdit"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\UltraEdit\command]
@="C:\\Program Files\\ULTRAEDT\\UEdit32"

It just inserts a registry key. I am sure you could modify it to do what you
want

--
Cheers,
Trevor L.


I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html

Reply to Anonymous

Archived from groups: microsoft.public.windowsxp.customize (More info?)

 

i can edit the registry to change the wallpaper but to make the wall paper
change i have to log off and then log back on and i don't want to have to do
that. i will try tis registry again and tweak it. i just know that someone
out there has to know what the switch is for the bat file to change the
background. there is something that i am missing and i hope i can find it
soon. thanks trevor, its a start!

"Trevor L." wrote:

> Weell!!
>
> I am a novice at altering the registry, but I have gleaned a few pointers
> from sites such as Kelly's
>
> Why not put the appropriate Registry commands in a .reg file. Then if you
> execute it (double click) it will update the Registry for you.
>
> Here is a file (ultraedit.reg) I got from who knows where, to add UltraEdit
> as a editor for use in IE
>
> Windows Registry Editor Version 5.00
> [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\UltraEdit]
> @="UltraEdit"
> [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\UltraEdit\command]
> @="C:\\Program Files\\ULTRAEDT\\UEdit32"
>
> It just inserts a registry key. I am sure you could modify it to do what you
> want
>
> --
> Cheers,
> Trevor L.
>
>
> I choose Polesoft Lockspam to fight spam, and you?
> http://www.polesoft.com/refer.html
>
>
>

Reply to Anonymous

Archived from groups: microsoft.public.windowsxp.customize (More info?)

 

Perhaps there isn't one. I know that cmd language can't. Programs can.

--
----------------------------------------------------------
http://www.microscum.com/mscommunity/
"ray buck" <raybuck@discussions.microsoft.com> wrote in message news:62383D49-4B2B-4354-9E69-1AB5493C0C6B@microsoft.com...
>i can edit the registry to change the wallpaper but to make the wall paper
> change i have to log off and then log back on and i don't want to have to do
> that. i will try tis registry again and tweak it. i just know that someone
> out there has to know what the switch is for the bat file to change the
> background. there is something that i am missing and i hope i can find it
> soon. thanks trevor, its a start!
>
> "Trevor L." wrote:
>
>> Weell!!
>>
>> I am a novice at altering the registry, but I have gleaned a few pointers
>> from sites such as Kelly's
>>
>> Why not put the appropriate Registry commands in a .reg file. Then if you
>> execute it (double click) it will update the Registry for you.
>>
>> Here is a file (ultraedit.reg) I got from who knows where, to add UltraEdit
>> as a editor for use in IE
>>
>> Windows Registry Editor Version 5.00
>> [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\UltraEdit]
>> @="UltraEdit"
>> [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\UltraEdit\command]
>> @="C:\\Program Files\\ULTRAEDT\\UEdit32"
>>
>> It just inserts a registry key. I am sure you could modify it to do what you
>> want
>>
>> --
>> Cheers,
>> Trevor L.
>>
>>
>> I choose Polesoft Lockspam to fight spam, and you?
>> http://www.polesoft.com/refer.html
>>
>>
>>

Reply to Anonymous

Archived from groups: microsoft.public.windowsxp.customize (More info?)

 

Place the following in a .bat file and run it logged into the profile you
want the wallpaper changed.

REG ADD "HKCU\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d
C:\Windows\NameOfWallpaper.bmp /f

Change the "NameOfWallpaper" to the name of the bmp file you want to change
to without quotes. Make sure of course it is at the location specified.

Sumladar


>"David Candy" wrote:

> Perhaps there isn't one. I know that cmd language can't. Programs can.
>
> --
> ----------------------------------------------------------
> http://www.microscum.com/mscommunity/
> "ray buck" <raybuck@discussions.microsoft.com> wrote in message news:62383D49-4B2B-4354-9E69-1AB5493C0C6B@microsoft.com...
> >i can edit the registry to change the wallpaper but to make the wall paper
> > change i have to log off and then log back on and i don't want to have to do
> > that. i will try tis registry again and tweak it. i just know that someone
> > out there has to know what the switch is for the bat file to change the
> > background. there is something that i am missing and i hope i can find it
> > soon. thanks trevor, its a start!
> >
> > "Trevor L." wrote:
> >
> >> Weell!!
> >>
> >> I am a novice at altering the registry, but I have gleaned a few pointers
> >> from sites such as Kelly's
> >>
> >> Why not put the appropriate Registry commands in a .reg file. Then if you
> >> execute it (double click) it will update the Registry for you.
> >>
> >> Here is a file (ultraedit.reg) I got from who knows where, to add UltraEdit
> >> as a editor for use in IE
> >>
> >> Windows Registry Editor Version 5.00
> >> [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\UltraEdit]
> >> @="UltraEdit"
> >> [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\UltraEdit\command]
> >> @="C:\\Program Files\\ULTRAEDT\\UEdit32"
> >>
> >> It just inserts a registry key. I am sure you could modify it to do what you
> >> want
> >>
> >> --
> >> Cheers,
> >> Trevor L.
> >>
> >>
> >> I choose Polesoft Lockspam to fight spam, and you?
> >> http://www.polesoft.com/refer.html
> >>
> >>
> >>
>

Reply to Anonymous

Archived from groups: microsoft.public.windowsxp.customize (More info?)

 

That doesn't change it. It changes the registry entry. Which means it won't work to next logon. Your key may or may not be the entry that specifies the wallpaper (there are two sets of wallpaper settings).

Also settings like this may be temporary or permanent. There are memory settings and registry settings.

If you read the reply I replied to you'll see why the user won't find your suggestion useful.

--
----------------------------------------------------------
http://www.microscum.com/mscommunity/
"Sumladar" <Sumladar@discussions.microsoft.com> wrote in message news:00CC1410-11EA-4667-98B9-420FCB8A076C@microsoft.com...
> Place the following in a .bat file and run it logged into the profile you
> want the wallpaper changed.
>
> REG ADD "HKCU\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d
> C:\Windows\NameOfWallpaper.bmp /f
>
> Change the "NameOfWallpaper" to the name of the bmp file you want to change
> to without quotes. Make sure of course it is at the location specified.
>
> Sumladar
>
>
>>"David Candy" wrote:
>
>> Perhaps there isn't one. I know that cmd language can't. Programs can.
>>
>> --
>> ----------------------------------------------------------
>> http://www.microscum.com/mscommunity/
>> "ray buck" <raybuck@discussions.microsoft.com> wrote in message news:62383D49-4B2B-4354-9E69-1AB5493C0C6B@microsoft.com...
>> >i can edit the registry to change the wallpaper but to make the wall paper
>> > change i have to log off and then log back on and i don't want to have to do
>> > that. i will try tis registry again and tweak it. i just know that someone
>> > out there has to know what the switch is for the bat file to change the
>> > background. there is something that i am missing and i hope i can find it
>> > soon. thanks trevor, its a start!
>> >
>> > "Trevor L." wrote:
>> >
>> >> Weell!!
>> >>
>> >> I am a novice at altering the registry, but I have gleaned a few pointers
>> >> from sites such as Kelly's
>> >>
>> >> Why not put the appropriate Registry commands in a .reg file. Then if you
>> >> execute it (double click) it will update the Registry for you.
>> >>
>> >> Here is a file (ultraedit.reg) I got from who knows where, to add UltraEdit
>> >> as a editor for use in IE
>> >>
>> >> Windows Registry Editor Version 5.00
>> >> [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\UltraEdit]
>> >> @="UltraEdit"
>> >> [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\UltraEdit\command]
>> >> @="C:\\Program Files\\ULTRAEDT\\UEdit32"
>> >>
>> >> It just inserts a registry key. I am sure you could modify it to do what you
>> >> want
>> >>
>> >> --
>> >> Cheers,
>> >> Trevor L.
>> >>
>> >>
>> >> I choose Polesoft Lockspam to fight spam, and you?
>> >> http://www.polesoft.com/refer.html
>> >>
>> >>
>> >>
>>

Reply to Anonymous

I use [url=http://www.philipp-winterberg.com/software/command_line_wallpaper_changer_portable.php][/url] as a wallpaper changer open the file then once it is extracted open the folder and drag photos on to it :bounce:

Reply to jamidodger1
- 1 +

To the OP:

This is how I accomplished what you were attempting:

Code :
  1. @ECHO OFF
  2. :: Written by Eric Husband
  3. :: 7/10/2009
  4. :: copies the wallpaper from a location into the proper directory and as the proper file name. DO NOT CHANGE THE DESTINATION FILE NAME.
  5. copy "\\ehusband-x1\ERIC\wallpaper1.bmp" "C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Microsoft\wallpaper1.bmp"
  6. :: Adds the necessary Registry values, in case this person is using a System Wallpaper. If they've already customized their wallpaper, the following lines are not necessary. They won't hurt though.
  7. REG ADD "HKCU\Control Panel\Desktop" /V Wallpaper /T REG_SZ /F /D "C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Microsoft\wallpaper1.bmp"
  8. :: Change the last number in the following line to a 0 if you want to center the bitmap on the desktop. Change the last number in the following line to a 2 if you want to stretch the bitmap vertically and horizontally to fit the desktop.
  9. REG ADD "HKCU\Control Panel\Desktop" /V WallpaperStyle /T REG_SZ /F /D 2
  10. :: Change the last number in the following line to a 0 to not tile the image; setting it to a 1 Tiles it.
  11. REG ADD "HKCU\Control Panel\Desktop" /V TileWallpaper /T REG_SZ /F /D 0
  12. :: The following line refreshes the desktop.
  13. %SystemRoot%\System32\RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters
  14. :: The following line Locks the workstation.
  15. %SystemRoot%\System32\RUNDLL32.EXE user32.dll, LockWorkStation

Reply to Husband
- -1 +

Reply to OP? OP posted on March 8, 2005, almost four and a half years ago. OP has left years ago. Where does this stuff get dug up from? Read the post date to avoid replying to members who no longer exist. Your post is irrelevant to any current member of which no one is asking for the information you provided.

Reply to badge

Thank you for this batch script, its proved to be very useful.

Husband wrote :

To the OP:

This is how I accomplished what you were attempting:

Code :
  1. @ECHO OFF
  2. :: Written by Eric Husband
  3. :: 7/10/2009
  4. :: copies the wallpaper from a location into the proper directory and as the proper file name. DO NOT CHANGE THE DESTINATION FILE NAME.
  5. copy "\\ehusband-x1\ERIC\wallpaper1.bmp" "C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Microsoft\wallpaper1.bmp"
  6. :: Adds the necessary Registry values, in case this person is using a System Wallpaper. If they've already customized their wallpaper, the following lines are not necessary. They won't hurt though.
  7. REG ADD "HKCU\Control Panel\Desktop" /V Wallpaper /T REG_SZ /F /D "C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Microsoft\wallpaper1.bmp"
  8. :: Change the last number in the following line to a 0 if you want to center the bitmap on the desktop. Change the last number in the following line to a 2 if you want to stretch the bitmap vertically and horizontally to fit the desktop.
  9. REG ADD "HKCU\Control Panel\Desktop" /V WallpaperStyle /T REG_SZ /F /D 2
  10. :: Change the last number in the following line to a 0 to not tile the image; setting it to a 1 Tiles it.
  11. REG ADD "HKCU\Control Panel\Desktop" /V TileWallpaper /T REG_SZ /F /D 0
  12. :: The following line refreshes the desktop.
  13. %SystemRoot%\System32\RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters
  14. :: The following line Locks the workstation.
  15. %SystemRoot%\System32\RUNDLL32.EXE user32.dll, LockWorkStation



Reply to dazbarlby

badge wrote :

Reply to OP? OP posted on March 8, 2005 ... Your post is irrelevant to any current member of which no one is asking for the information you provided.



However, any good posting will valid to others as well. Look at the next post after your little rant...? The answers provided were helpful to myself as well; even in 2009

Reply to TheMadman420
Tom's Hardware > Forum > Windows XP > Configuration & Customize > can a .bat file change the desktop wallpaper
Go to:

There are 803 identified and unidentified users. To see the list of identified users, Click here.

Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them