Home

Awesome

PersistentWindows

This project addresses a long-standing issue in Windows 7, 10, and 11, where windows get repositioned after events such as the system waking up, external monitor connections or disconnections, changes in monitor resolution (e.g., exiting full-screen gaming), or during RDP reconnections. The code was forked from ninjacrab.com/persistent-windows.

Original Description

What is PersistentWindows?

A poorly named utility that persists window positions and size when the monitor display count/resolution adjusts and restores back to its previous settings.

For those of you with multi-monitors running on a mixture of DisplayPort and any other connection, you can run this tool and not have to worry about re-arranging when all is back to normal.

Key Features

Installation

Note: the program can be run from any directory, but the program saves its data in C:\Users\[User]\AppData\Local\PersistentWindows

For PersistentWindows to be able to restore windows with elevated privileges (for tools like Task Manager or Event Viewer), it needs to be run with Administrator privileges.

To set up PersistentWindows to automatically start at user login:

This can be done by creating a task in Task Scheduler, or by adding a shortcut to the Startup Folder (shell:startup).

Choose one of the three options:

Task Scheduler (Windows 10/11)

Task Scheduler (Windows 7/10/11)

  start "" /B "%~dp0PersistentWindows.exe" -splash=0
schtasks /create /sc onlogon /tn "StartPersistentWindows" /f /tr "'%~dp0pw.bat'" /rl HIGHEST
REM Override High DPI Scaling
REG ADD "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "%~dp0PersistentWindows.exe" /t REG_SZ /d "~ HIGHDPIAWARE" /f

Startup Folder (Windows 7/10/11)

Usage Instructions

Privacy Statement

Known Issues

Tips To Digest Before Reporting A Bug or Enhancement Request