MonitorLayout help

Saving and restoring where your windows sit.

What it does

MonitorLayout writes down the size and position of every window you have open, and can put them all back later. It's meant for the moment you dock or undock a laptop and Windows scatters everything.

It only moves application windows.

It does not change your screen resolution, your display arrangement, or which monitor is primary. It never needs administrator rights, and nothing leaves your PC.

Saving a layout

Arrange your windows how you want them, run MonitorLayout.cmd, and choose 1. Give the layout a name you'll recognise later, such as docked or laptop. Press Enter on its own to use the name default.

Restoring a layout

Run the file again, choose 2, and type the name you saved. Windows snap back to their saved positions. The script prints what it restored and what it skipped, and writes the same summary to %APPDATA%\MonitorLayout\last_restore.txt.

Where layouts are stored

In %APPDATA%\MonitorLayout, one .json file per layout. Option 3 in the menu opens that folder. They're plain text, so you can read, back up, copy, or delete them freely.

Why some windows get skipped

Multiple monitors and scaling

Positions are saved relative to the monitor a window was on, not as raw desktop coordinates. That means a layout still lands correctly when a monitor is at a different position or a different scaling percentage. If a saved monitor is gone entirely, those windows land on your primary screen instead of disappearing off the edge.

"Windows protected your PC"

That blue box appears because the file is free and unsigned, not because anything is wrong with it. Click More info, then Run anyway. You can also open MonitorLayout.cmd in Notepad first and read exactly what it does, which is the reason it ships as plain text.

Removing it

Delete MonitorLayout.cmd and the folder %APPDATA%\MonitorLayout. Nothing else is written, and nothing runs in the background.