Solved

Batch Script for Changing Desktop Wallpaper and Adding Reg Entries

Posted on 2010-09-23
4
960 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
 
LVL 82

Expert Comment

by:leakim971
ID: 33750171
0
 

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 82

Expert Comment

by:leakim971
ID: 33750726
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 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