Solved

Batch Script for Changing Desktop Wallpaper and Adding Reg Entries

Posted on 2010-09-23
4
940 Views
Last Modified: 2012-06-27
Hi Guys,

Its Footy Day today (Australian Rules) and my manager wants me to write a script up that will change peoples desktop backgrounds to a picture from a general network folder, and disable the Themes and Desktop Tab from the Display Properties.

These are the 2 keys that will disable the tab's:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoThemesTab"=dword:00000001

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]
"NoDispBackgroundPage"=dword:00000001

A simple Batch Script would be suffice i would assume, ive tried to write my own up though im still quite new to this :(

If i could get one that will also reverse these effects that would be awesome!

Thanks in Advance,

Adrian :)
0
Comment
Question by:Adrian_May
  • 2
4 Comments
 
LVL 82

Expert Comment

by:leakim971
Comment Utility
0
 

Author Comment

by:Adrian_May
Comment Utility
Perhaps to clarify, I would not like to give them an option.

I would only like to make a batch that is only going to set one wallpaper for everyone, and remove the ability to change it.

then a reversal script would also be appreciated :)
0
 
LVL 82

Expert Comment

by:leakim971
Comment Utility
0
 
LVL 21

Accepted Solution

by:
AmazingTech earned 500 total points
Comment Utility
Below code is a batch file. Save it as a .CMD in ANSI format.

Set WallpaperImage="\\Server\Share\Footy Pic Of The Day.bmp"

REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoThemesTab" /t REG_DWORD /f /d 1
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "NoDispBackgroundPage" /T REG_DWORD /f /d 1

REG ADD "HKCU\Control Panel\Desktop" /v Wallpaper /t REG_SZ /f /d %WallpaperImage%

rundll32.exe user32.dll,UpdatePerUserSystemParameters

0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

If like me you are one who spends a lot of time working and scripting with cmd.exe, sometimes it is handy to be able to quickly view a calendar for a given month and year. This script will quickly do just that!  Save the code posted below to a .bat …
I have published numerous articles here at Experts Exchange that present programs/scripts written in a language called AutoHotkey. Each of those articles has a brief paragraph describing where to download the product and how to install it. I have al…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now