Switch between multiple displays (monitors) directly with a shortcut or from the command line in Windows 7 and Windows 8

If you have multiple displays or an external projector, you might be familiar with the built-in feature of Windows 7 and Windows 8 to change the active display and the sharing mode of your current desktop. When you press Win+P, you can choose to extend your desktop, duplicate it, or turn off one of the displays entirely. It is possible to control this feature via the command line, so you can create a shortcut any of these 4 settings. Let's see how it can be done.
WinP[1]
The built-in Windows utility, DisplaySwitch.exe, allows you to specify which display to use and how to use it.
displayswitch
It supports the following command line arguments:

  • DisplaySwitch.exe /internal

    The /internal argument is used to switch your PC to use the primary display only.
    Tip: You can try these options right in the Run dialog. Open it with the Win + R shortcut and type the command above in the Run box.

  • DisplaySwitch.exe /external

    Use this command to switch to the external display only.

  • DisplaySwitch.exe /clone

    Duplicates the primary display

  • DisplaySwitch.exe /extend

    Expands your Desktop to the secondary display

That's it. Now you can create a shortcut with the appropriate command.
shortcut
You can assign a global keyboard shortcut as described in the article: Add global hotkeys to launch your favorite applications in Windows 8.1.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Advertisment

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer from Russia who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

5 thoughts on “Switch between multiple displays (monitors) directly with a shortcut or from the command line in Windows 7 and Windows 8”

  1. My laptop has two external graphics ports, but only one can be active at a time. I have the HDMI going to my TV and the VGA to a small monitor on my desk. With the laptop screen as primary, can I use DisplaySwitch to pick which one will be active and which one will be disconnected?

  2. Hai sir/madam
    Once I was just trying commands in command prompts I tried the command as “Displayswitch”
    And accidentally click on “projector only”.

    The problem is I don’t have a projector and the moniter is not displaying anything.

    How can I make it back to moniter for displaying purpose

Leave a Reply

Your email address will not be published. Required fields are marked *