36

I am using Microsoft's Live Mesh program to remotely access a PC running Windows 7, running on 2 screens: one with 1920x1080 and the other 1920x1200 resolution.

I am accessing them via an old laptop with 1024x1078 resolution. The result is such tiny icons/commands that it is difficult to try and change the screen resolution from 2 high-res displays to the single low res display.

It would be great if there was a command line way of doing this. Or perhaps there is way through live mesh to do it. Any ideas?

Ƭᴇcʜιᴇ007
  • 111,883
  • 19
  • 201
  • 268
Bill Rodman
  • 792
  • 2
  • 9
  • 18

10 Answers10

28

Use QRes then say,

QRes.exe /x:800 /y:600
Austin Adams
  • 103
  • 4
Ash
  • 487
  • 4
  • 8
  • A tiny utility that does exactly what I need. – Bill Rodman Jan 29 '10 at 11:43
  • 6
    I combine this utility with the Windows7 DisplaySwitch.exe command: "C:\Windows\System32\DisplaySwitch.exe /internal" to switch exclusevely to the main monitor. – Bill Rodman Jan 29 '10 at 12:17
  • Displayswitch.exe also has command line parameters that allow you to create a shortcut that will set a specific display mode. /internal /clone /extend /external – JJS Jun 15 '12 at 22:41
  • 7
    Doesn't work with Windows x64. – Fantius Nov 24 '14 at 01:59
  • 1
    The latest version seems to work fine on Windows 10 64-bit. -- Doesn't appear to be a way to address and individual monitor though. It always just works against the primary screen. -- The hack that others posted (use DisplaySwitch) seems like it might work, as long as you only have two monitors... – BrainSlugs83 Jan 24 '16 at 17:21
  • DisplaySwitch.exe /internal didn't work for me, but when I ran DisplaySwitch.exe a 2nd time with no arguments, a dialog box popped up and I was able to switch to single monitor mode. This saved me from having to drive into the office, thanks @BillRodman – wytten Oct 27 '17 at 14:31
  • Be aware that the tool is pretty old (Win 98) and needs to be installed. And only seems to make sense for a single display. – Cadoiz Jan 10 '22 at 14:32
  • The installer of QRes does not work on x64, however QRes itself works on x64. [This version](http://www.softpedia.com/progDownload/QRes-Download-618.html) does not use an installer (and therefore works on x64). The link has originally been posted by @Tinytox. – squarebrackets Feb 09 '22 at 10:15
  • Why is this the top response? "How do I do something in windows" should never involve "Download this program!" We don't want another program. We want to know how to do what the program is doing WITHOUT THE PROGRAM. I get tired of seeing QRes as an answer for this question when it's NOT an answer at all. It's an alternative. – GroggyOtter Apr 25 '23 at 23:25
19

The nircmd freeware tool can do this.
To change the display to 1024 x 768 with a 24 bit color depth:

nircmd.exe setdisplay 1024 768 24

nircmd also has other very numerous functions.

harrymc
  • 455,459
  • 31
  • 526
  • 924
  • 2
    if you're using a laptop like mine that doesn't support 24-bit color. You might have to change the 24 to 32 -- nircmd.exe setdisplay 1024 768 32 – Julian Aug 15 '13 at 22:13
  • Why its not permanently changed? But temporary getting applied? – YumYumYum Apr 26 '18 at 21:40
  • @yum You can use the `-updatereg` parameter, the new settings will be saved in the Registry. Nircmd supports other monitors like `setdisplay monitor:1 1024 768 24 90` with refresh rate 90 Hz. – Cadoiz Jan 10 '22 at 14:35
10

I found a Windows Powershell script sample*, provided by Microsoft Technet, that is able to change the screen resolution.

The best way to invoke it, I found, was from a separate Powershell script, that looks like this:

## This loads the function (defined in another script)
. C:\[YOUR-PATH]\Set-ScreenResolution

## invoke with width and height
Set-ScreenResolution -Width 1680 -Height 1050

(Note I had saved the Microsoft script as Set-ScreenResolution.ps1)

Then from the command line or Start->Run you can invoke the second Powershell script, which I named Invoke-Set-ScreenResolution.ps1 like this (the -noexit param is good at first for debugging, but you may want to remove it later on depending on whether you want the command window to close):

powershell -noexit -ExecutionPolicy Bypass & C:\[your-path]\Invoke-Set-ScreenResolution.ps1

*Original Source (no longer available)

*Wayback Machine Source

Michael Lucas
  • 199
  • 1
  • 4
7

I used a combination of Qres.exe and Sleep.exe (put these in your Windows folder) in startup batch files to change resolution among 2 users. The actual script is as follows:

@echo off
sleep 2
QRes.exe /x:1280 /y:960

(Whereas the low-res copy is Qres.exe /x:800 /y:600)


If you want your icons to stay where you want them... read on.
You'll need two more downloads:

Install Startup Delayer and place DesktopOK wherever you like, I used my 'user' folder. Organize your desktop, how you want it to be on every reboot.

In DesktopOK go to Options and tick "Restore by Windows Startup", right click on the newly made "Icon Layout" and click "Use this for: Restore at Windows Startup".
At this point you'll need to also check "Start DesktopOK with windows". The later two options will be unchecked automatically by of Startup Delayer later on.

Now locate DesktopOK in Startup Delayer and right-click "Delay" it.

Now there's only one thing left to do, make your startup batch file.

@echo off
sleep 2
QRes.exe /x:1280 /y:960
sleep 1
"C:\Program Files\r2 Studios\Startup Delayer\Startup Launcher.exe" /LaunchApps=Common

Of course you'll need to put it in your startup folder, the reason the process is so extensive with the icons is because DesktopOK can't handle the resolution switch, and wants to move icons while the resolution is being changed, so we needed to delay the registry startup, and this is the only way I found. I don't dare claim this to be the best way, but I do claim it works, I found no other way, and I came up with the process myself. It gets around every aspect of the situation by replacing icons where they belong per-user.

Thanks for being so flexible Microsoft!

Cadoiz
  • 519
  • 3
  • 10
Tinytox
  • 71
  • 1
  • 2
6

Try Display Changer 2, which can do this, as well as start a program and change the resolution back when it's stopped running (which you MAY be able to get working with mesh, but YMMV)

DLeh
  • 234
  • 2
  • 4
  • 12
Phoshi
  • 23,233
  • 2
  • 61
  • 81
  • Works a beaut! Thanks for this find, I was about to use QRes but this is better for changing the resolution and refresh rate for a specific app (a game) then restoring it when it exits. – Allon Guralnek Mar 24 '21 at 12:05
  • If you're here for gamestream, this answer works, qres does not work for changing resolution to a custom 4k res. – Muhammad Ali Feb 11 '22 at 06:22
5

None of the already mentioned tools had all that I needed, so I came up with my own solution: ChangeScreenResolution.exe

Examples:

Change screen resolution of all monitors to 800x600px

ChangeScreenResolution.exe /w=800 /h=600

Change screen resolution of all monitors to 800x600px with refresh rate of 60Hz and 32bit color depth

ChangeScreenResolution.exe /w=800 /h=600 /f=60 /b=32

Set color depth of display with index 1 to 16bit

ChangeScreenResolution.exe /b=16 /d=1 

Quick overview of the options:

Possible options (you can set OR query)
  Setting options
    /w=<width>      Width in pixel       eg 800
    /h=<height>     Height in pixel      eg 600
    /f=<frequency>  display refresh rate eg 60
    /b=<bpp>        bits per pixel       eg 32

  Querying options
    /l              list all connected display devices
    /m              list all available mode settings

  Filtering options
    /d=<device>     devices to modify/query, separated by comma, eg:
                      all (default)
                      0 (monitor with index 0, see option /l)
                      0,2 (monitors with index 0 and 2)
                      \\.\DISPLAY1 (name of display, see option /l)
  • I haven't tested your solution, but +1 for creating your own :) – Thomas Mar 29 '16 at 18:03
  • Well, I ended up testing it and prefer it above the other options above in terms of simplicity. However, it didn't work for me (a display adapter problem on my end). Still, great little utility! – Thomas Mar 29 '16 at 20:00
  • @Thomas what was the problem? If you use all devices it has to work for all of them. You should see in the output if an adapter fails. In my cases it was always a virtual one or so. I can see if I can provide a fix for that. – Alexander Taubenkorb Mar 30 '16 at 05:47
  • I don't want to use these comments as a forum for troubleshooting. But it's definitely an error on our end. The computer is having a black screen on Windows boot but I can access a command line remotely via our RMM agent and I was hoping to force it into VGA mode to get the screen to come back up. No dice. Not a problem with your app, just the computer I was running it on. – Thomas Mar 31 '16 at 17:15
  • 1
    What is the license for your utility? – Michael Lucas Jan 10 '18 at 21:00
  • 1
    @MichaelLucas, there is no actual licence, but you can use it anyhow you want ;-) Thanks for asking! – Alexander Taubenkorb Jan 11 '18 at 07:05
4

While somebody already mentioned Nirsoft's nircmd, the best tool from Nirsoft for this purpose is MultiMonitorTool.

It supports multi-monitor, saved configurations, 32 and 64 bit, changes in resolution, activation and orientation, etc.

pgr
  • 982
  • 1
  • 7
  • 15
  • The other tools mentioned didn't work for me, but this one did. Excellent tool for changing screen resolutions in a flash -- thanks for posting. – Moshe Rubin Aug 28 '16 at 10:54
1

Worthy to note the solution through built-in wmic command of Windows Management Instrumentation

wmic desktopmonitor create screenheight=1024, screenwidth=768

Though can result in:

ERROR:
Description = Provider is not capable of the attempted operation

in some "providers"

1

There is PoweShell funtion which does that described here

Set-DisplayResolution
   [-Width] <Object>
   [-Height] <Object>
   [-Force]
   [<CommonParameters>]

The Set-DisplayResolution cmdlet changes the display resolution for Windows Server® 2012/2016. Specify both the width and the height in pixels. Unless you use the Force parameter, the cmdlet prompts you before it changes the settings. You can use the Get-DisplayResolution cmdlet to view the current resolution.

0

I want to add to the following answer: https://superuser.com/a/1047172/508396

  1. If you need two non-standard resolutions on 2 screens, for example - 1920x1440 and 1390x720 and those don't appear in Windows settings, - you won't be able to switch to those resolutions. Use CRU-1.5.2 to add custom resolutions to "Detailed resolutions" table in the CRU application for each screen. Once you add custom resolutions you need to run restart.exe/restart64.exe tool that comes with CRU-1.5.2 to commit those changes to Windows.
  2. Once you have two custom resolutions available, you can create a batch file to change both screens' resolutions. Unfortunately, I couldn't find the way to position screens in relation to each other with this tool :
    ChangeScreenResolution.exe /w=1390 /h=720 /f=60 /b=32 /d=1
    ChangeScreenResolution.exe /w=1920 /h=1440 /f=30 /b=32 /d=0
    
  3. To measure the custom resolution for the screen, you can set the screen to a maximum native-supported resolution first(for example 3040x1440) and measure the square on that screen with Powertoys Ruler (for example 2875x1440). You also can use the code I wrote to calculate the ratio of the resolution by providing the resolution in pixels - Replit code to find the perfect resolution to be supported by the screen. For example, my screen of 3040x1440 is actually viewable, to my taste, at a custom 1390x720 resolution, as there are bevelled corners on my screen that cut the picture.