Since the Task Manager was rewritten for Win8 and later, this behavior begun to exhibit itself to the common annoyance of its users. The Task Manager reads its settings from the registry on load, then immediately deletes the stored value. (Why? Mind blown...)
Upon exit, the Task Manager stores its current setup back to the registry. If the Task Manager does not terminate properly (system crash, app killed, etc.) as you point out, the settings do not get written. There is nothing preserved to be loaded upon the
next start, hence the annoying compact window all over again.
The workaround (which can barely be called a solution):
- Open Task Manager and set everything up as you like it. Then close Task Manager to allow the settings to be written to the registry.
- Open the Registry Editor (Win+R, type in "regedit", hit Enter/Run).
- Navigate to "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\TaskManager" and verify that there is a "Preferences" binary value.
- Export the TaskManager key (right-click and hit export, save to a convenient location, only the "Selected branch") as a .reg file, e.g. taskmgr-preferences.reg
- Merge taskmgr-preferences.reg before launching the Task Manager after it has crashed to recover your preferred settings. (Note that merging will overwrite any Task Manager settings that you set after you'd exported the value.)
- Run the Task Manager in your preferred way and allow it to read the (re)stored preference values.
If you are used to launching the Task Manager on log in, I suggest putting your taskmgr-preferences.reg in one folder together with a taskmgr-launch.cmd batch file with these contents:
timeout /t 1
reg import taskmgr-preferences.reg
start /min C:\Windows\System32\Taskmgr.exe
This script will ensure that your desired preferences are ready for the Task Manager to pick up on no matter what. (I find that without the initial timeout, the Task Manager fails to open on sign-in sometimes.)
Finally, put a shortcut to your .cmd file in your StartUp folder (open Explorer - Win+E, type into the address bar [Alt+D] the following: "shell:startup", hit enter, drag over/copy a shortcut to your batch file).
Good luck hack-fixing what the professional engineering team could not do for you in the first place.
If anyone can make this method more efficient, I am all ears.
Best,
Ruben