?
Solved

script to change screen colour

Posted on 2011-02-23
13
Medium Priority
?
333 Views
Last Modified: 2012-05-11
I have some 2000 Terminal Servers where for one reason or another the screen colors and the default printer will change.   As a quickfix for users I  would like to give them a button that would switch the screen colours/background and the default printers back to what they want. One problem is that in order for the screens and default printer to be reverted the user would have to have admin rights.  I would like to

1) have a script that would do this

2) point a shortcut  on their desktop to this script so that when they click it will start a process that has enough  rights to switch things back  - in other words elevate the process to run as admin without the user entering admin name and password
0
Comment
Question by:lineonecorp
[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
  • 7
  • 6
13 Comments
 
LVL 30

Accepted Solution

by:
SiddharthRout earned 1200 total points
ID: 34969834
Try this for changing the wallpaper. Save this code in a text file and save it as a .VBS. Once done, right click on the file and click on properties. In the security tab, give it full admin rights.

Dim ws, strUser

Set ws = WScript.CreateObject("WScript.Shell")
strUser = ws.ExpandEnvironmentStrings("%USERNAME%")

Set oShell = CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")

sWinDir = oFSO.GetSpecialFolder(0)
sWallPaper = "c:\MYFile.bmp"

'~~> Update in registry
oShell.RegWrite "HKCU\Control Panel\Desktop\Wallpaper", sWallPaper
'~~> Update system
oShell.Run "%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", 1, True

Open in new window


Now regarding the printers...
>>default printers back to what they want.

How will the code decide what users want? Do you want to specify some constant printer for all of them? If yes then you might use the GPO for that?

Sid
0
 

Author Comment

by:lineonecorp
ID: 34973202
Thanks for the code. I am assuming that I can create a shortcut to it on the desktop of the user in question?

As far as the printer, yes, I want to specify a specific printer for one or more persons who are experiencing the problem but not for the whole organization. Could I do that via a script like the screen colour script?

I will try the screen colour script change in the meantime.
0
 
LVL 30

Assisted Solution

by:SiddharthRout
SiddharthRout earned 1200 total points
ID: 34978958
Yes you can do that. But give it Admin Rights from the security tab. Did you try it?

>>Could I do that via a script like the screen colour script?

Yes, I think you can do it. Let me try it my printer.

Sid
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 30

Assisted Solution

by:SiddharthRout
SiddharthRout earned 1200 total points
ID: 34978967
In fact you don't need to specify separate printers for separate users. You may let them choose if you want?

Sid
0
 

Author Comment

by:lineonecorp
ID: 34989114
No. In the case I'm talking about it would be just a few users who are to have a specific printer and a specific screen colour so no choice necessary.
0
 
LVL 30

Assisted Solution

by:SiddharthRout
SiddharthRout earned 1200 total points
ID: 34989932
Ok. :)

Did you check the above script for wall paper?

Sid
0
 

Author Comment

by:lineonecorp
ID: 34992580
I'm going to check over the next few days. I will let you know.
0
 

Author Comment

by:lineonecorp
ID: 34995003
I think there's a little misunderstanding.  The problem is the background  we want to change is not an image file it’s a color code with the following information:
 
Hue=141
Sat=115
Lum=105
Red=58
Green=110
Blue=165
0
 
LVL 30

Assisted Solution

by:SiddharthRout
SiddharthRout earned 1200 total points
ID: 34995948
Are you referring to theme(Appearance and Color Scheme)?

Sid
0
 

Author Comment

by:lineonecorp
ID: 35030913
Yes, I am referring to theme (Appearance and Colour Scheme).
0
 

Author Comment

by:lineonecorp
ID: 35187792
Still on this?
0
 
LVL 30

Assisted Solution

by:SiddharthRout
SiddharthRout earned 1200 total points
ID: 35213890
Sorry, I was kinda busy...

See if this link helps?

Title: (appearance&color scheme) from a vbscript
http://stackoverflow.com/questions/697161/modify-xp-theme-appearancecolor-scheme-from-a-vbscript

Sid
0
 

Author Comment

by:lineonecorp
ID: 35220722
Thanks. Let me take a look.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses

777 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