Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Wallpaper based on client screen resolution

Posted on 2009-12-23
5
Medium Priority
?
3,101 Views
Last Modified: 2012-08-29
is there any posible way to assign different wallpaper resolution by GPO based on client screen resolution setting??

like wide screen users will get the wide screen background
normal will get the normal one?
0
Comment
Question by:uaeabudhabi77
5 Comments
 
LVL 13

Expert Comment

by:NarendraG
ID: 26111082
0
 

Author Comment

by:uaeabudhabi77
ID: 26111136
I am trying to define a wallpaper based on screen resultion, I dont want to define screen resolution since I have defferent types and sizes of screens
0
 
LVL 13

Expert Comment

by:NarendraG
ID: 26111151
i dont this you can do it with gpo

may be script can help you

reference

http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/XP/Q_23919390.html
0
 
LVL 27

Accepted Solution

by:
bluntTony earned 2000 total points
ID: 26111369
Hi there,

Below is a script I wrote for a previous question which can be enforced via a login script. You can modfy for the possible screen sizes and assign the required wallpaper.

It used WMI to detect the screen size (same as link provided by NarendraG) and then assigns the require jpg in the registry, then updates the wallpaper.

You just need to change the Select/Case section for your possible sizes and jpgs.

Tony



Set objWMIService = GetObject("Winmgmts:\\.\root\cimv2") 
Set objSh = CreateObject("Wscript.Shell")
Set colItems = objWMIService.ExecQuery("Select * From Win32_DesktopMonitor where DeviceID = 'DesktopMonitor1'",,0) 
For Each objItem in colItems 
    intHorizontal = objItem.ScreenWidth 
    intVertical = objItem.ScreenHeight 
Next

strResolution = CStr(intHorizontal) & " x " & CStr(intVertical)

Select Case strResolution
Case "1600 x 1200"
	strWallpaperPath = "\\nsanas\applications\tony.bmp"
Case "1024 x 768"
	strWallpaperPath = "\\server\share\wall1024x768.bmp"
Case "1280 x 800"
	strWallpaperPath = "\\server\share\wall1280x800.bmp"
Case "1280 x 1024"
	strWallpaperPath = "\\server\share\wall1280x1024.bmp"
Case Else
End Select

'Set the reg value
objSh.RegWrite "HKCU\Control Panel\Desktop\Wallpaper", strWallpaperPath, "REG_SZ"

'Apply the change
objSh.Run "%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", 0, False

Open in new window

0
 

Expert Comment

by:Brasil-Ponto-Com
ID: 38347286
Hi guys,
I used this script but had the following problem:

Invalid use of Null: 'Cstr'

Please, help me.
Thanks
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

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

Active Directory can easily get cluttered with unused service, user and computer accounts. In this article, I will show you the way I like to implement ADCleanup..
Transferring FSMO roles is done when an admin wants to split roles between certain Domain Controllers or the Domain Controller holding the Roles has been forcefully demoted using dcpromo / forceremoval
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

571 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