Solved

Batch Script for Changing Desktop Wallpaper and Adding Reg Entries

Posted on 2010-09-23
4
964 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Author Comment

by:Adrian_May
ID: 33750348
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 21

Accepted Solution

by:
AmazingTech earned 500 total points
ID: 33755801
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you receive another warning that your shared drive is almost full and you have asked your users to clean out old files again and again, here is a single command that may help. This command will place all the files that have not been used rec…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

691 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