GUIDES

Monitor Profile Switcher Command Line Guide: -load, -save & -debug

Monitor Profile Switcher is not just a tray app. Its command-line executable can load or save a display profile from a batch file, a shortcut, Task Scheduler, or a Stream Deck button — no clicking through menus. This guide documents the exact syntax from the project’s own wiki, including the two rules that trip everyone up: where -debug goes, and when you need an absolute path.

MonitorSwitcher.exe -load:Gaming.xml
MonitorSwitcher.exe -save:Work.xml
MonitorSwitcher.exe -debug -load:C:\Users\You\AppData\Roaming\MonitorSwitcher\Profiles\Gaming.xml

Two Executables, One Job Each

The portable ZIP contains two programs that must stay together in the same folder:

  • MonitorSwitcherGUI.exe — the graphical app. It lives in your system tray, and it is where you create and save profiles with the mouse (right-click the tray icon, then Save Profile).
  • MonitorSwitcher.exe — the command-line tool. It loads or saves a profile and then exits. It has no window of its own, which is exactly why scripts and launchers love it.

A profile is a single XML file that stores your display configuration: each monitor’s resolution, its position in the layout, whether it is enabled, cloned or disabled, and which monitor is the primary display. Profiles live in %USERPROFILE%\AppData\Roaming\MonitorSwitcher\Profiles. When you save a profile called “Gaming” in the GUI, you get a Gaming.xml file in that folder — and that file name is what the command line uses. Because profiles are plain files in a known folder, they can also be backed up, synced and carried to a new PC — the full workflow is in our backup and restore guide.

The Exact Syntax

There are only two actions, plus one optional flag:

-load:FileName.xml — apply the profile stored in that XML file.

-save:FileName.xml — save the current Windows display configuration into that XML file, overwriting it if it exists.

-debug — write diagnostic output while loading or saving. It must come before -load: or -save:, never after.

Two details matter. First, the separator is a colon, not a space or an equals sign, and the file name follows it directly — no quotes are needed in the examples the project itself documents. Second, the absolute-path rule: if you pass just a file name, the tool looks for the XML next to MonitorSwitcher.exe. Because your profiles normally live in the AppData Profiles folder — not next to the executable — scripts should pass the full path, as in the third example at the top of this page. Passing only -load:Gaming.xml works when Gaming.xml sits in the same folder as the executable, which is a handy trick for portable setups: copy the XMLs beside the exe and your commands stay short.

If a profile fails to load, re-run the same command with -debug first. The debug output tells you which monitor in the profile could not be matched — usually because Windows reassigned a display ID after a cable, dock or driver change. Our troubleshooting hub covers that recovery flow step by step.

Worked Example 1: A Gaming.bat That Switches Profiles

The most common use of the CLI is a one-click batch file. Create a text file named Gaming.bat on your desktop with this content (adjust the user name and folder to your setup):

@echo off
cd /d “C:\Tools\MonitorProfileSwitcher”
MonitorSwitcher.exe -load:C:\Users\You\AppData\Roaming\MonitorSwitcher\Profiles\Gaming.xml

Double-clicking the file applies the Gaming profile: side monitors off, main display primary — whatever you saved under that name in the GUI. Make a matching Work.bat that loads Work.xml and you have a two-click desk. Because the batch file changes into the program folder first, relative profile names would also work if you keep copies of the XMLs there.

Worked Example 2: Backing Up a Layout From the CLI

You can also capture the current layout without opening the GUI. Arrange your monitors in Windows Settings first, then run:

MonitorSwitcher.exe -save:C:\Users\You\AppData\Roaming\MonitorSwitcher\Profiles\Docked.xml

This is ideal right before a driver update or a desk rearrangement: one command snapshots the layout that works, and the matching -load: command restores it in seconds if the update scrambles your screens.

Apply a Profile Automatically at Logon (Workaround)

Be clear about this: Monitor Profile Switcher has no built-in autostart or “apply at logon” setting. The project’s own wiki documents a manual workaround instead — and it works reliably:

  1. Create a shortcut to MonitorSwitcherGUI.exe (the tray app) and place it in your Startup folder — press Win + R, type shell:startup, and drop the shortcut there. Make sure the shortcut’s “Start in” field points at the program folder, so the GUI finds its companion executable.
  2. To apply a specific profile at logon, create a second shortcut whose target is the CLI: "C:\Tools\MonitorProfileSwitcher\MonitorSwitcher.exe" -load:Docked.xml (with a full path to the XML if it is not beside the exe). Windows runs it right after sign-in.
  3. Prefer Task Scheduler? Create a basic task triggered “At log on”, with the same CLI command as the action. Add a 10–20 second delay so your GPU driver and dock finish initialising before the profile is applied — the single most common cause of “it didn’t work at startup” reports.

Stream Deck and Hotkey Pads

Because the CLI is a plain executable call, any launcher can trigger it. Community how-to guides popularised the pattern with the Elgato Stream Deck: add a “System: Open” action, point it at a small batch file (or directly at MonitorSwitcher.exe with the -load: argument), give the button a label like “Gaming” or “Work”, and one press swaps the whole desk. The same batch files work unchanged with AutoHotkey, Touch Portal, Loupedeck, or a plain desktop shortcut with a keyboard hotkey assigned in its Properties. This batch-file pattern comes from the community, not from the original project — the project’s contribution is the CLI itself.

Honest Limits of the CLI

  • The CLI loads and saves display configuration only: resolution, position, enabled/cloned state and the primary monitor. It cannot switch refresh rates, HDR, or audio output devices — those were never features of this tool.
  • Profiles are matched to monitors by hardware IDs. Move a cable to a different port, swap a dock, or update your GPU driver and an old profile may refuse to load; re-save it once and it works again.
  • NVIDIA Surround and AMD Eyefinity groups are not supported — disable the group before saving individual layouts.

New to the tool? Start with the download page, save your first two profiles from the tray GUI, then come back here and automate them. More answers live in the FAQ.

The same launcher trick extends one step further: pair a -load: call with an audio-device switch in the same batch file or hotkey, and one press moves picture and sound — desk speakers to TV audio and back. The complete recipe is in switch audio output with your display profile.

Common Mistakes (and the Two-Minute Fixes)

  • Scripting the wrong executable. MonitorSwitcherGUI.exe starts the tray app and stays running; MonitorSwitcher.exe does the one-shot load or save and exits. Scripts, shortcuts and Stream Deck buttons should call the second one.
  • Putting -debug at the end. In the documented syntax the flag comes first: MonitorSwitcher.exe -debug -load:Profile.xml. Placed after the action, it is not treated as the debug switch.
  • Relative paths in Task Scheduler. A scheduled task starts in a system folder, not in your profile folder, so a bare file name is not found. Always use the full path to the XML in scheduled tasks.
  • Expecting hotkeys without the GUI. Global hotkeys belong to the tray application. If your hotkeys stop responding, the GUI is not running — relaunch MonitorSwitcherGUI.exe, or use a batch-file shortcut instead. Our guide to switching display profiles with a hotkey compares every keyboard method.
  • Spaces in profile names. A profile called “Gaming Setup” becomes Gaming Setup.xml, which makes command lines awkward. Save profiles with single-word names — Gaming, Work, Docked, TV — and every example on this page works verbatim.

Still stuck? Run your failing command once with -debug in front and read which display could not be matched; nine times out of ten the profile simply predates a cable, port or driver change, and re-saving it once in the GUI fixes the command for good.

Similar Posts