Solved

Batch Script for Changing Desktop Wallpaper and Adding Reg Entries

Posted on 2010-09-23
4
956 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
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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How can I run a vbs script to all members servers in a domain? 9 23
Problem to cell option 1 36
VBScript Write Column Headers 3 41
creating a random password in batch 4 25
Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

827 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