From: VanguardLH on
John S wrote:

> Operating systems XP, Vista, Win7
>
> Would like something which operates at boot time to restore desktop to
> predetermined settings if they have been changed by a previous user.
>
> I have downloaded software "Desktop OK" which will restore the icons to
> their previous layout, and would also like to restore the desktop
> background to its predetermined setting (in this case, no background
> picture, just a uniform colour).
>
> Is there simple freeware for this, or is it a job for a batch file (in
> which case how to design the batch file)?
>
> cheers,
>
> John S

There are a couple of wallpapers you can configure:

http://www.pctools.com/guides/registry/detail/103
http://www.pctools.com/guides/registry/detail/1097

You could export these registry keys. Then, as a startup item, use
reg.exe to import them. Whatever they got changed to will get changed
back to whatever is specified in the .reg file(s) you import.

You could create a .bat file that ran reg.exe (regedit /s <file>.reg)
but that isn't necessary. Just add the complete reg.exe command as a
startup item. In fact, if you don't want to put the command in either
your Startup group or under the Run key for your Windows account, you
could run the command as a login script (see the properties for your
Windows account - I know how to do this under Windows XP but would have
to guess for Vista and up). You could even define a scheduled event in
Task Scheduler that runs "at logon" to run the reg.exe command.

Each Windows account has a login and logoff script that it can run. So
you could use a reg.exe command in the logoff script to record what
wallpapers were inuse at the time you logoff and then use reg.exe in a
logon script to reinstate those same wallpapers. You would use "reg.exe
/export <keyname> mywallpapers.reg" in the logoff script to save the
registry settings and then use "reg.exe /import <keyname>
mywallpapers.reg" in the logon script. That presumes that somehow your
wallpapers are somehow getting changed other than by you within your
Windows session and you want them back.

Obviously the wallpaper configured for a specific account is only
applicable when you logon under that account. Obviously you need to
have admin permissions for the Windows account under which you login to
do anything with the registry. And just as obvious is that you should
NOT be sharing your Windows login with anyone else if you want to ensure
that no one else is changing it. If wallpapers are getting pushed by
corporate policy on their domain, the host you are using is not your
property and you are expected to use what they give you to use to do
your job. If this is in a work scenario, contact your IT folks about
changing to a different wallpaper (if the one you select doesn't stick
for some reason).

Based on only what you said, use reg.exe to export the registry keys
mentioned in the above articles. That saves the registry entries in a
file. Then put reg.exe as a startup item (in Startup folder, Run
registry key, login script for your Windows account, or scheduled event
ran at logon) to load the values stored in that .reg file.
From: Cawshus on
John S <gorblimey(a)invalid.invalid> wrote in
news:gi1q64qzdzxk.z9m839svamst$.dlg(a)40tude.net:

>
>
> Would that line be just written into a batch file placed in the
> startup folder?
>
> I guess I would need two lines - one to run the .reg file, then
> another to run the RUNDLL32.exe file. Not sure how to construct these
> so that the two processes are run, and do so in the background without
> needing any user input.
>
> I guess I'm stretching things by carrying on this discussion in
> alt.comp.freeware, though maybe a batch file is DIY freeware?
>
> Thanks again,
>
> John S
>
>

This is not freeware, so we may be consideered OT by some. However, it
is adressing your request for freeware and I doubt there is a NG called
HowToAvoidInstallingYetAnotherUtility :-)

You should be able to use a .bat file. Two lines would do it:

C:\Path\Regfile.reg
RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters

Where 'Path' is the filepath to the directory where you find your .reg
file and 'Regfile' is the name you gave your .reg file.

Easiest way to solve whether it works is to test it:
1) write your .bat file
2) change your wallpaper to something else
3) run the bat file.

Unless you've done something wrong with the .reg files, the worst case
scenario is that it won't do anything except give you a 'bad command'
message. One you work it all out and it rund, you may find a few useful
extras here:

http://commandwindows.com/batch.htm



--
� Steve

Due to the volume of garbage I filter out googlegroups.

From: John S on
On 3 Aug 2010 17:35:32 +1100, Cawshus wrote:

> John S <gorblimey(a)invalid.invalid> wrote in
> news:gi1q64qzdzxk.z9m839svamst$.dlg(a)40tude.net:
>
>>
>>
>> Would that line be just written into a batch file placed in the
>> startup folder?
>>
>> I guess I would need two lines - one to run the .reg file, then
>> another to run the RUNDLL32.exe file. Not sure how to construct these
>> so that the two processes are run, and do so in the background without
>> needing any user input.
>>
>> I guess I'm stretching things by carrying on this discussion in
>> alt.comp.freeware, though maybe a batch file is DIY freeware?
>>
>> Thanks again,
>>
>> John S
>>
>>
>
> This is not freeware, so we may be consideered OT by some. However, it
> is adressing your request for freeware and I doubt there is a NG called
> HowToAvoidInstallingYetAnotherUtility :-)
>
> You should be able to use a .bat file. Two lines would do it:
>
> C:\Path\Regfile.reg
> RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
>
> Where 'Path' is the filepath to the directory where you find your .reg
> file and 'Regfile' is the name you gave your .reg file.
>
> Easiest way to solve whether it works is to test it:
> 1) write your .bat file
> 2) change your wallpaper to something else
> 3) run the bat file.
>
> Unless you've done something wrong with the .reg files, the worst case
> scenario is that it won't do anything except give you a 'bad command'
> message. One you work it all out and it rund, you may find a few useful
> extras here:
>
> http://commandwindows.com/batch.htm

Thanks very much - I'm getting quite close to what I want.

The above two lines don't quite get me there, because the command:-

C:\test\RgistryBackground.reg

brings up the dialogue box asking if I want add the information to the
registry.

However, when I change to the format recommended in the post from
VanguardLH, to:-

regedit /s C:\test\RgistryBackground.reg

the .reg file runs without requiring any input.

Using your suggestion, the second line of my batch file:-

RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters

instantly updates one of the new registry entries in the batch file (the
one which switches off the wallpaper)

[HKEY_CURRENT_USER\Control Panel\Desktop]
"Wallpaper"=""

Success! but it doesn't instantly update the second registry change

[HKEY_CURRENT_USER\Control Panel\Colors]
"Background"="0 128 128"

This does take effect though after logging off and logging back on again.

I can live with this OK, but if you happen to know the appropriate command
to instantly update that second change, it would be useful.

I really appreciate your efforts to assist me - there are some great people
contributing to this newsgroup.

Cheers,

John S
From: John S on
On Mon, 2 Aug 2010 11:32:08 -0500, VanguardLH wrote:

> John S wrote:
>
>> Operating systems XP, Vista, Win7
>>
>> Would like something which operates at boot time to restore desktop to
>> predetermined settings if they have been changed by a previous user.
>>
>> I have downloaded software "Desktop OK" which will restore the icons to
>> their previous layout, and would also like to restore the desktop
>> background to its predetermined setting (in this case, no background
>> picture, just a uniform colour).
>>
>> Is there simple freeware for this, or is it a job for a batch file (in
>> which case how to design the batch file)?
>>
>> cheers,
>>
>> John S
>
> There are a couple of wallpapers you can configure:
>
> http://www.pctools.com/guides/registry/detail/103
> http://www.pctools.com/guides/registry/detail/1097
>
> You could export these registry keys. Then, as a startup item, use
> reg.exe to import them. Whatever they got changed to will get changed
> back to whatever is specified in the .reg file(s) you import.
>
> You could create a .bat file that ran reg.exe (regedit /s <file>.reg)
> but that isn't necessary.
snip

Thanks very much.

I have managed to create a .reg file which makes the registry changes that
I need, and your above suggestion solved the problem of how to run it
without having to respond to pop-up dialogue boxes.

The .reg file contains:-

[HKEY_CURRENT_USER\Control Panel\Desktop]
"Wallpaper"=""

[HKEY_CURRENT_USER\Control Panel\Colors]
"Background"="0 128 128"

Another contributor (Cawshus) suggested adding a line to the batch file:-

RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters

which instantly updates and displays the effect of the first line of my
..reg file by switching off any wallpaper, but the change made by the second
line of my .reg file is not instantly implemented, and has to wait until
the next log on.

So I'm very close to achieving what I'm wanting, and can live with the
solution so far.

Many thanks for assisting.

Cheers,

John S
From: Cawshus on
John S <gorblimey(a)invalid.invalid> wrote in
news:110xhvp34n8e7$.zxc1krwzumnk$.dlg(a)40tude.net:


> Success! but it doesn't instantly update the second registry change
>
> [HKEY_CURRENT_USER\Control Panel\Colors]
> "Background"="0 128 128"
>
> Cheers,
>
> John S
>

You are out of my depth now. When I need help on doing things like this I
visit the Scripting Guys:

http://social.technet.microsoft.com/Forums/en/ITCG/threads

If you spell out your needs there, together with where you are and advise
whether or not you have scripting enabled, someone may give you either the
extra little bit you need or an alternative solution.


--
� Steve

Due to the volume of garbage I filter out googlegroups.

First  |  Prev  |  Next  |  Last
Pages: 1 2 3
Prev: Puppy Linux 5.0.7(beta)
Next: Installing Boost