I recently upgraded to Windows 10 on my home PC. In Windows 7 I had a few startup programs that I used often set to open on a second monitor at startup. These programs would always open in the same location with the same size. I assume this is a feature of both Windows and/or the program itself.
In Windows 10 I have noticed that some programs do not display this behavior. They specifically are opened in the same location, but 10-20px shorter in the horizontal direction. For example, on start up (or even during general usage) I will horizontally maximize Windows explorer.exe
. When explorer is then opened again though, 10-20px of width are taken from the left and right side of the window
In the image above, the top portion shows explorer opened and horizontally maximized. The bottom shows explorer opened again after closing and its default location and size set by (I assume) Windows. (The light blue is image background, black is "no man's land" in desktop space, the dark gray is my desktop background, the red lines show the general location of the missing width of the window).
How can I force Windows 10 to truly and always open programs in the exact same location with the exact same size?
Note, some programs do not have this issue. Specifically Firefox, it will always open in the exact same location with the exact same size. Though I am wholly certain this is a feature of Firefox. Given explorer.exe
is Windows', then I know this issue is on Windows' end too.
Best Answer
A free tool exists that uses the script language of AutoHotkey.
A user named gallaxhar has created a script in the post Automatically Restore Last Window Position For Each Process that acts as an automatic window manager that saves window positions with no user input or setup. It works by getting the current active window information (id and processname). It saves the latest window size/pos to an
ini
file, and reads from that file when new window IDs become active. It will auto-size only windows from after it is run, it will only autosize new ID's, and it will only do so one time for that ID.After installing AutoHotkey, place the script in an
.ahk
file. Test by double-click to launch. It will have a green "H" icon in the traybar, which you may right-click to Exit. Once proven as working correctly, you may place it in your Startup folder.I tested the script and it seems to work in your scenario.
The script is reproduced here:
A commercial tool that also remembers and restores the position and size of programs and windows is DeskSoft WindowManager (10$, trialware).
This tool will remember positions and sizes across reboots.