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?
Asked
Active
Viewed 5,980 times
2 Answers
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.
Sam Cogan
- 38,158
- 6
- 77
- 113
-
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? – Matt Hanson May 14 '09 at 05:37
-
See changes above – Sam Cogan May 14 '09 at 08: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
Andrew Williams
- 667
- 8
- 20
Jon
- 1
-
Does this even work on Windows XP's ancient and limited version of PowerShell? – Michael Hampton Aug 28 '20 at 20:11
-