From: Jaz on 15 Nov 2007 15:53 Does anybody know how I can change a users desktop wallpaper using a script or batch file? I would like it to change when they log in. Any suggestions? Thanks, Jasper
From: mr_unreliable on 15 Nov 2007 16:48 hi Jasper, Sometimes we get better info from delphi (gasp!) sites than from the ms windows sites. See here: http://www.chami.com/tips/delphi/111696D.html If you have trouble reading delphi, it looks to me as if they are just changing a registry value, and sending out a "broadcast" message to tell other apps of the registry change. You can change a registry value from script by using the regwrite method. If you are planning to do this during login, then the broadcast message is probably not necessary. cheers, jw ____________________________________________________________ You got questions? WE GOT ANSWERS!!! ..(but, no guarantee the answers will be applicable to the questions) Jaz wrote: > Does anybody know how I can change a users desktop wallpaper using a script > or batch file? > > I would like it to change when they log in. > > Any suggestions? > > Thanks, > Jasper > >
From: Jaz on 15 Nov 2007 17:15 Thanks, The scripts I have found on the internet seem to work but the only problem is that it does not take affect until you log back in. According to some of the scripts, this command should activate the registry change immediately: oShell.Run "%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", 1, True This does not work. I have seen the simular command being referenced but it does not seem to work. Any ideas? Thanks, Jasper "mr_unreliable" <kindlyReplyToNewsgroup(a)notmail.com> wrote in message news:%23xm6ZC9JIHA.1184(a)TK2MSFTNGP04.phx.gbl... > hi Jasper, > > Sometimes we get better info from delphi (gasp!) sites > than from the ms windows sites. See here: > > http://www.chami.com/tips/delphi/111696D.html > > If you have trouble reading delphi, it looks to me as > if they are just changing a registry value, and sending > out a "broadcast" message to tell other apps of the > registry change. > > You can change a registry value from script by using > the regwrite method. > > If you are planning to do this during login, then the > broadcast message is probably not necessary. > > cheers, jw > ____________________________________________________________ > > You got questions? WE GOT ANSWERS!!! ..(but, > no guarantee the answers will be applicable to the questions) > > > > Jaz wrote: > > Does anybody know how I can change a users desktop wallpaper using a script > > or batch file? > > > > I would like it to change when they log in. > > > > Any suggestions? > > > > Thanks, > > Jasper > > > >
From: RemS on 15 Nov 2007 17:34 "Jaz" wrote: > Does anybody know how I can change a users desktop wallpaper using a script > or batch file? > > I would like it to change when they log in. > > Any suggestions? > > Thanks, > Jasper > Go to registry key: HKEY_CURRENT_USER\Control Panel\Desktop there you see that the Windows in fact make a new and converted version of the picture to set as desktop wallpaper. What you need to to is copy, that registry key, and also copy the different versions of the picture from a sample computer and copy then to exact the same location, but now for logged-on user's profile on the client computer. After the registry is edited and the files are copied, run this command: Set oShell=CreateObject("WScript.Shell") oShell.Run "RunDLL32.exe user32.dll, UpdatePerUserSystemParameters",0 ,False What i did once was creating two 'shadow' keys: HKEY_CURRENT_USER\Control Panel\Desktop.org HKEY_CURRENT_USER\Control Panel\Desktop.def The ...\Desktop.def contains all the entries that you want users to use. A script copied all original entries and subkeys from the ...\Desktop key to the ...\Desktop.org key. And then copies all entries from ...\Desktop.def key to the ...\Desktop key. oShell.Run "Reg.exe copy ""HKCU\Control Panel\Desktop.def"" ""HKCU\Control Panel\Desktop"" /f /s",0 ,True Update SystemParameters to load the new wallpaper \Rems
From: Jaz on 16 Nov 2007 09:07
THANKS!!! "RemS" <RemS(a)discussions.microsoft.com> wrote in message news:5A5895CF-CF70-4DD6-A006-B94C10475FDF(a)microsoft.com... > "Jaz" wrote: > > > Does anybody know how I can change a users desktop wallpaper using a script > > or batch file? > > > > I would like it to change when they log in. > > > > Any suggestions? > > > > Thanks, > > Jasper > > > > Go to registry key: > HKEY_CURRENT_USER\Control Panel\Desktop > there you see that the Windows in fact make a new and converted version of > the picture to set as desktop wallpaper. > What you need to to is copy, that registry key, and also copy the different > versions of the picture from a sample computer and copy then to exact the > same location, but now for logged-on user's profile on the client computer. > > After the registry is edited and the files are copied, run this command: > Set oShell=CreateObject("WScript.Shell") > oShell.Run "RunDLL32.exe user32.dll, UpdatePerUserSystemParameters",0 ,False > > What i did once was creating two 'shadow' keys: > HKEY_CURRENT_USER\Control Panel\Desktop.org > HKEY_CURRENT_USER\Control Panel\Desktop.def > > The ...\Desktop.def contains all the entries that you want users to use. > > A script copied all original entries and subkeys from the ...\Desktop key to > the ...\Desktop.org key. And then copies all entries from ...\Desktop.def key > to the ...\Desktop key. > > oShell.Run "Reg.exe copy ""HKCU\Control Panel\Desktop.def"" ""HKCU\Control > Panel\Desktop"" /f /s",0 ,True > > Update SystemParameters to load the new wallpaper > > \Rems |