5

We've got a workstation with four monitors that is shared by multiple users. Depending on the user, the screen resolution of all four monitors needs to be changed. I'm looking for a way to simplify/automate the process of changing the resolutions, possibily with a script of some sort? Can this be done?

2 Answers 2

9

ResSwitch is a utlity that will do what you want. Its a command line tool that you send the resolution, colour depth and refresh rate - e.g

resswitch.exe 800 600 32 60

You can use the device switch to specify which device the command applies to, specifying the name of the device. So for 4 monitors you'd probably be best creating a batch file with 4 commands in.

To get the names of the devices you can use ResCopy, also included in that zip file to display them.

2
  • Looks like an awesome little app. I quickly took a look at it, but got stumped when trying to apply changes to all/multiple monitors. I'm sure it's simple, but you wouldn't happen to know the syntax for changing multiple monitors at once would you? May 14, 2009 at 5:37
  • See changes above
    – Sam Cogan
    May 14, 2009 at 8:44
0
#This script will change the display resolution of a remote PC
#The user would only need to log off to see changes
#Resolution is changed thru the registry.
#The Registry path may be slightly different based on equipment type

$Computer = Read-Host -Prompt 'ENTER PC NAME TO CHANGE RESOLUTION'
$RES1 = Read-Host -Prompt 'ENTER FIRST RESOLUTION PARAMETER (EX. 1024)'
$RES2 = Read-Host -Prompt 'ENTER SECOND RESOLUTION PARAMETER (EX. 768)' 
 
Invoke-Command -Computername $Computer -Scriptblock{
param($RES1, $RES2)
"RES1: $RES1"
"RES2: $RES2"

$Key="HKLM:\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\HWP*\00"
Set-ItemProperty -Path $Key -Name PrimSurfSize.cx -Value $RES1 -Force
Set-ItemProperty -Path $Key -Name PrimSurfSize.cy -Value $RES2 -Force

$Key="HKLM:\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\RTK*\00"
Set-ItemProperty -Path $Key -Name PrimSurfSize.cx -Value $RES1 -Force 
Set-ItemProperty -Path $Key -Name PrimSurfSize.cy -Value $RES2 -Force

$Key="HKLM:\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\MSH*\00"
Set-ItemProperty -Path $Key -Name PrimSurfSize.cx -Value $RES1 -Force 
Set-ItemProperty -Path $Key -Name PrimSurfSize.cy -Value $RES2 -Force
}-ArgumentList $RES1, $RES2

POWERSHELL -NOEXIT
2
  • Does this even work on Windows XP's ancient and limited version of PowerShell? Aug 28, 2020 at 20:11
  • I have not tried it on more ancient OS's yet.
    – Jon
    Aug 31, 2020 at 18:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .