Set desktop wallpaper based on screen resolution for both WinXP and Win7

I'm hoping someone can answer this for me. I would like to be able to set the desktop wallpaper based on the current screen resolution when a user logs in. I've made several .BMP files for varying resolutions with our corporation logo. But, say
if a wallpaper for a resolution of 1024x768 on a 4:3 monitor is set, then that monitor is replaced with a 16:10 monitor with a resolution of 1280x800 or 1600x900, the wallpaper looks stretched out and ugly. The only way to change it is manually on
each computer, but most end users (students) would not have permissions to do so.
I thought this question would have been asked before, but after many, many searches, I've only come across one reference that copies the background from a network share to a location on the local computer, which I found
here. In my case, the file will already be on the local computer, but I am not sure how to force the system to change the wallpaper based on the current screen resolution. I'm sure it is possible and maybe I am overlooking something very simple. I
was also thinking that this would either happen only once on first login or maybe based on user authentication (which group the user belongs to) so that teachers are still able to change their wallpaper, but students would not be able to.
If it helps, I will be deploying the image using MDT 2010 Update 1. The same base image will be used on multiple machine types (HP desktop sand laptops and Lenovo desktops) which could have one of 6-7 different monitor types connected. I'd also like
this to happen on the local machine instead of GPO or logon script as there is already a lot happening there.
I would need to be able to do this for both Windows XP Pro and Windows 7 Ent x64. The XP machines will mostly have 4:3 monitors, but there are exceptions.
Maybe what I am asking isn't entirely possible or possible at all. I, unfortunately, am in the extremely early stages of learning Microsoft Scripting (VBScript and PowerShell) to use with MDT 2010, so I know next to nothing when it comes to these scripting
processes, but am willing to try and learn.
Any help anyone can suggest, I would be extremely grateful.

I almost abandoned this because I thought it was going to interfere with using BGInfo. But, as it turns out, I was able to incorporate the running of BGInfo into a script that I
created. And, once I saw what 16:10 Aspect Ratio background looked like on a 16:9 Aspect Ratio screen, I was not satisfied.
I happened to use the first script that MkShffr posted from geekshangout.com, but then I added more items to it. I also created three high-res wallpaper backgrounds as suggested
by pagerwho.
My script is based on the Aspect Ratio of the current resolution. Since most, if not all, systems will get the resolution set during deployment, this was easy to calculate.
And by forcing the output of the Aspect Ratio to two decimal places, I just used a Case statement to select which aspect ratio to choose from and apply the wallpaper assigned to it. I thought about using If Then statements, but I think the Case statement
is much cleaner.
And, because BGInfo wants to change the Picture Position to "Tile" instead of "Fit" that I manually set it to in my image, I added two reg key change lines per Case. BGInfo still
changes the Picture Position to "Tile", but for whatever reason, this works. I tested this by using a laptop with a 16:9 Aspect Ratio screen. In my image, I manually set a 16:10 wallpaper because that will be the primary Aspect Ratio used in our corporation,
however we are getting more 16:9 Aspect Ratio laptops and from what HP is saying, everything will be standardizing on this Aspect Ratio.
I made sure the Screen profile that I saved in my image was loaded which includes the 16:10 wallpaper. I then placed this script in the “C:\ProgramData\Wallpaper_Change”
directory that I created in the image. I then added a registry value in HKLM\System\Microsoft\Windows\CurrentVersion\Run and created a String Value. I did this so that it would run at log in, but I didn't want it to show in the Startup Folder in the All Programs
Menu. It takes less than a second to run, but it seems to work well. I tested it several time to see if there were any anomalies, but it seemed to work great each time. I have yet to test it with a computer that is on the domain with a regular user account,
which I will be doing in the next day or two.
In the mean time, if someone want to try it out and see if it works from thier use, here is the code. I did comment out the wscript.echos, but left them in to use for troubleshooting
in the future.
-Mike
==============================
Option Explicit
Dim array_ScreenRes, screenRes_X, screenRes_Y, oIE, width, height, aspect_ratio
Dim decpos, wallpaper1, wallpaper2, wallpaper3, oShell
array_ScreenRes = GetScreenResolution
screenRes_X = array_ScreenRes(0)
screenRes_Y = array_ScreenRes(1)
wallpaper1="C:\Windows\Web\Wallpaper\TSC\Win 7 - 2560 x 1440 (16-9)TSC.bmp"
wallpaper2="C:\Windows\Web\Wallpaper\TSC\Win 7 - 2560 x 1600 (16-10)TSC.bmp"
wallpaper3="C:\Windows\Web\Wallpaper\TSC\Win 7 - 2560 x 1920 (4-3)TSC.bmp"
Set oShell = CreateObject("Wscript.Shell")
'wscript.echo "Resolution is " & screenRes_X & "x" & screenRes_Y
aspect_ratio = screenRes_X/screenRes_Y
decpos=instr(aspect_ratio,".")+2
aspect_ratio=left(aspect_ratio,decpos)
'wscript.echo "Aspect Ratio is " & aspect_ratio
Select Case aspect_ratio
Case "1.77"
 oShell.RegWrite("HKCU\Control Panel\Desktop\Wallpaper"), wallpaper1
 oShell.RegWrite("HKCU\Software\Microsoft\Internet Explorer\Desktop\General\WallpaperSource"), wallpaper1
 oShell.RegWrite("HKCU\Control Panel\Desktop\TileWallpaper"), "0"
 oShell.RegWrite("HKCU\Control Panel\Desktop\WallpaperStyle"), "6"
Case "1.6"
 oShell.RegWrite("HKCU\Control Panel\Desktop\Wallpaper"), wallpaper2
 oShell.RegWrite("HKCU\Software\Microsoft\Internet Explorer\Desktop\General\WallpaperSource"), wallpaper2
 oShell.RegWrite("HKCU\Control Panel\Desktop\TileWallpaper"), "0"
 oShell.RegWrite("HKCU\Control Panel\Desktop\WallpaperStyle"), "6"
Case "1.33"
 oShell.RegWrite("HKCU\Control Panel\Desktop\Wallpaper"), wallpaper3
 oShell.RegWrite("HKCU\Software\Microsoft\Internet Explorer\Desktop\General\WallpaperSource"), wallpaper3
 oShell.RegWrite("HKCU\Control Panel\Desktop\TileWallpaper"), "0"
 oShell.RegWrite("HKCU\Control Panel\Desktop\WallpaperStyle"), "6"
End Select
oShell.Run "%windir%\System32\RUNDLL32.exe user32.dll,UpdatePerUserSystemParameters", 1, True
oShell.Run "C:\ProgramData\BGInfo\BGInfo.exe C:\ProgramData\BGInfo\TSC.bgi /timer:0"
Function GetScreenResolution()
 Set oIE = CreateObject("InternetExplorer.Application")
 With oIE
    .Navigate("about:blank")
    Do Until .readyState = 4: wscript.sleep 100: Loop
    width = .document.ParentWindow.screen.width
    height = .document.ParentWindow.screen.height
 End With
 oIE.Quit
 GetScreenResolution = array(width,height)
End Function

Similar Messages

  • Need to create high & low payment based on 20% down for both 36 and 42 month lease terms.

    I have 3 different tables on my worksheet and need to formulate low and high payment scenarios for both 36 and 42 month lease terms based on 20% down. Help.

    trods wrote:
    Anyone?
    Patience, trods. Remember that this is a user-to-user forum, and the participants arrive when they choose to or are able to, not according to a work schedule set by an employer.
    On your question:
    So far you have supplied two factors, and implied a third, that would affect the size of the payments to be made:
    Total amount, downpayment as a percentage of the total amount, and the term on the agreement in months.
    From that you want to calculate a "low payment scenario" and a "high payment scenario" for a term of 36 months, and the same two scenarios for a term of 42 months.
    Missing from the data is whatever factor determines how a "low payment scenario" differs from a "high payment scenario." What's missing?
    Regards,
    Barry

  • Antivirus for Both OSX and Win7 on iMac

    Hi,
    I have my imac and macbook pro installed with Win7 and OSX. Do i need an antivirus for both OS?
    Can i just have one (say antivirus on Win7) and the other OS is also protected?
    THanks!

    To add one more piece, Tony, to what Templeton and Roger have said...while Mac OS X is not prone to virus attacks, it can pass a virus along. If you have an infected file, email, etc., Mac OS X can pass that infection to the Windows OS you are running when you transfer files over or pick up the files with Win. The message they gave shoud be followed: get a good Windows anti-virus program to protect yourself on that side of the system.
    And if you want one for Mac OS X, there is a good free program called ClamXav, highly regarded over on the Mac OS X discussions:
    http://www.clamxav.com
    Ralph
    Ralph

  • Resizing  Screen Resolution for Specific Apps?

    Hello team,
    Is it possible to resize screen resolution for specific applications? Most of my apps look fine at 1024x768, but there are a couple of older OS 9 apps that I need to run (talking school computers here) which are a bit on the small side when viewed at that resolution. Can I somehow set things so that when those applications are launched, the resolution changes to 800x600, and then reverts to 1024x768 when they're quit again? Any and all details about this will be most appreciated, and I thank you in advance for your help!
    Electronically yours,
    Erik D. Dahlin
    School-based Technology Specialist

    LCD panels must be used at their native resolution. Whatever it is for you monitor is what you must set it to.
    Bob

  • Screen resolution for remote client

    I have used Windows remote desktop and it has the fuction of setting the display resolution of the target machine when you login. So if i am on using a small laptop with small screen resolution (1024 x 768) and connect to a remote machine with a high resolution i can set the remote machine to display at 1024x768 nativly (no stretching or scalling).
    DOES APPLE REMOTE DESKTOP HAVE THIS FUNCTIONALITY?

    Ok so the solution was to user a different VNC client in Ubuntu. "Vinagre" allows you to view your remote session scaled to any size you like. It will however retain the dimentions of your MacBook screen.
    One thing to be aware of is that when authentication your VNC session (entering your username and password) Vinagre only allows you to enter a password of 8 characters max. So if your password is longer then 8 characters you will have to shorten it to user Vinagre... A bit annoying but at least it works.
    Techy notes:
    It is actially the VNC server Vino that Vinagre uses that is enforcing the password length limit. So if using an alternative client that uses Vino as it's VNC server this limit will apply for that client also.
    Even though you are scaling the client session down VNC sends the host's full resolution so you will still transfer a lot of data over the network.

  • [solved]Different Screen Resolution for different Users[/solved]

    hello
    i'm running kdemod
    i'd like to set up an account for my mum
    she prefers a resolution of 800X600
    whereas i like 1024X768
    my xorg.conf is set up like
    Section "Screen"
    Identifier "Screen0"
    Device "Videocard0"
    Monitor "Monitor0"
    DefaultDepth 24
    Option "TwinView" "0"
    Option "TwinViewXineramaInfoOrder" "CRT-0"
    Option "metamodes" "1024x768 +0+0"
    SubSection "Display"
    Depth 24
    EndSubSection
    EndSection
    when i log into the newly created account and use nvidia-settings
    the resolution can be changed successfully
    but upon restarting
    it reverts back to 1024X768
    i'd like to know how i could set up different resolutions for both of us
    Last edited by nikbhardwaj (2009-10-03 12:23:21)

    arkham wrote:You could add a startup script for your user with "xrandr -s 1024x768", while adding another for your mother account with "xrandr -s 800x600"
    where do i add this
    .xinitrc in the home directory ??
    or .xsession in the home directory

  • 24"iMAC optimal screen resolution for photo processing

    I have a 24" iMAC (matte) and do mostly photo editing. What is the optimal screen resolution for photo processing work?
    thanks
    a/d/

    All Screens are 72 dpi (dots per inch- in reference to pixels) no matter what screen resolution you use. The only difference the screen resolution will make is the size of the photo when you are viewing. Higher resolution means the picture will take up less space in you work area, but you will most likely have to zoom in to edit finer areas. Lower resolution will cause the picture you are editing to take up more of your work space and to see multiple photos side by side you will have to zoom out of fron the photos. So, really the choice is up to you.
    When creating the original document, this is where you need to monitor the dpi. The higher the dpi, the clearer your photo will look in print. A high dpi also means more disk space is being taken up by the photo. Generally a good dpi for print is 300 dpi. Anything that is only purposed for a screen based project (i.e. internet logos) should be saved at 72 dpi. Why use disk space and cause your pages to take longer load if no one will be able to tell the difference on screen between 72 and 300 dpi?
    Hope this helps!

  • Screen Resolution for CS4 apps?

    I'm finding my 22" screen distorts my files. What are some tips for the best screen resolution for the following:
    PhotoShop
    Illustrator
    InDesign
    Dreamweaver
    This is Windows XP Pro.
    Thanks for your help.

    LCD panels must be used at their native resolution. Whatever it is for you monitor is what you must set it to.
    Bob

  • How we will maintain screen resolution for tmaintaining able control in BDC

    how we will maintain screen resolution for tmaintaining able control in BDC. can you give the code or how we have to set it

    Hi,
    You need to use the CTU_PARAM options with the call transaction method.This is used if you would like to do a commit work once call trnasaction is done. This has also got very important property, for example if your Screen resolution is different from others then the screen (Application) will be different that is you'll be having say 5 lines in your screen where as your friend will be having 8 or 10 so your program might fail in this case. If you set variable DEFSIZE as 'X' it will always use the default screen size and hence avoids error.
    Use CALL TRANSACTION 'XXX' OPTIONS FROM w_ctu_params.( type CTU_PARAMS)
    This structure contains the follwing.
    DISMODE : Display mode (like the MODE addition)
    UPDMODE: Update mode (like the UPDATE addition)
    CATTMODE: CATT mode (controls a CATT)
    CATT mode can have the following values:
    ' ' No CATT active
    'N' CATT without single-screen control
    'A' CATT with single-screen control
    DEFSIZE : Use default window size (Here we are handling those transaction by giving default window size)
    RACOMMIT: Do not end transaction at COMMIT WORK
    NOBINPT : No batch input mode (that is, SY-BINPT = SPACE)
    NOBIEND : No batch input mode after the end of BDC data.
    The components DEFSIZE , RACOMMIT, NOBINPT, and NOBIEND always take the following values:
    'X' Yes
    This might help u in better understanding...
    Re: regarding bdc
    Re: ctu_params
    Regards
    Sudheer

  • Screen resolution for Fusion Applications?

    We are in process to set screen resolution standard for our ADF applications. We are much interested to know about supported screen resolution in fusion applications. Can any body let us know what is minimum required resolution for fusion applications? And what is recommended resolution?

    It is 1280*1024 as per
    Standard Screen Resolution for Fusion Apps

  • Why cant I set a wallpaper to menu screen?

    Itunes says I have the newest available software(4.2.1) for my iPod touch,
    but I cant set a wallpaper to home screen, or view open apps, or activate "negative" color view. 
    What is this? I have deleted all data on my iPod, and reinstalled software, but its still the same problem...

    I do not believe that. The 2G and 3G iPod look identical on the outside.
    The iPod touch (3rd generation) can be distinguished from iPod touch (2nd generation) by looking at the back of the device. In the text below the engraving, look for the model number. iPod touch (2nd generation) is model A1288, and iPod touch (3rd generation) is model A1318.

  • What is the optimum screen resolution for Macbook Pro 15 inch?

    Hi, can anyone please provide advice on the optimum screen resolution for a 15 inch MacBook Pro?

    Natively you'll get a resolution of 1440 x 900 or you can pay for an upgrade  to 1680 x 1050(current models).

  • 11gr1 - Handling different screen resolutions for an enterprise app.

    Hi,
    We are developing an enterprise application that will be deployed at different clients with different hardware.
    We are confused about how to handle different screen resolutions and wonder how others are handling this.
    We have some fixed size areas in our screens and liquid areas for content that may expand. The problem is say that you have a table with 6 columns. This table will be rendered nicely at 1280X800 but not at 1650X1050 or 800X600.
    At higher resolutions we will either end up having some blank space or expand one of the columns of the table , but can't expand every column proportionally and this will look ugly.
    For lower resolutions same problem in a different way will come into picture, we will not able to resize the columns and end up with scroll bars etc ...
    What is the best practice with handling different screen resolutions for components like table,panel splitter etc ?
    Thanks

    Hi Muhammed,
    I don't think that any better solution exists, you already use liquid layouts and define widths & heights with percentages etc. In my opinion using blank column at the end of table columns makes table's looking better. Additionally creating custom skin for table and defining column heights & widths with % or em may help you to stretch columns?

  • Screen resolution for iPhoto

    Screen resolution for iPhoto-I keep getting the message when I open iPhoto,"screen resolution not optimal for iPhoto". How do I find what is the optimal resolution?

    See this previous discussion
    Re: When I open iPhoto I get on the screen The currant screen resolution is not optimal for iPhoto

  • Optimum Screen Resolution for Slides

    I need to create a few slides which will be displayed full-screen. Since
    there's no way to know the resolution of the monitors of the many
    participants, how do I choose the resolution of my slides? Are they
    downsampled in any way by the Adobe server when I upload them? My screen
    resolution is 1920 x 1200 but I suspect a slide built to that resolution
    would create problems for viewers on smaller monitors. Am I right? Is
    there an optimum screen resolution for slides viewed during a Connect Pro
    session?

    Natively you'll get a resolution of 1440 x 900 or you can pay for an upgrade  to 1680 x 1050(current models).

Maybe you are looking for