Where is the last window size and position of various Microsoft applications stored in Windows?

Talk about anything
william_ahk
Posts: 639
Joined: 03 Dec 2018, 20:02

Where is the last window size and position of various Microsoft applications stored in Windows?

30 Nov 2022, 07:45

Does anyone know where it's stored? Like explorer, notepad, mspaint, etc.
User avatar
jNizM
Posts: 3201
Joined: 30 Sep 2013, 01:33
Contact:

Re: Where is the last window size and position of various Microsoft applications stored in Windows?

30 Nov 2022, 09:23

Each program stores information about its windows in its own way.

e.g. for Explorer:
HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell
[AHK] v2.0.18 | [WIN] 11 Pro (23H2) | [GitHub] Profile
william_ahk
Posts: 639
Joined: 03 Dec 2018, 20:02

Re: Where is the last window size and position of various Microsoft applications stored in Windows?

30 Nov 2022, 23:25

@jNizM Ah I thought there's a global storage for window position. I was wondering whether AHK Gui can utilize that.
Btw is it possible for Explorer to not remember the last window position and always use a default one? I want it to be always maximized every time. Currently I'm using this hack to force the window maximized:

Code: Select all

#e::Run ::{20D04FE0-3AEA-1069-A2D8-08002B30309D},, Max
User avatar
lmstearn
Posts: 714
Joined: 11 Aug 2016, 02:32
Contact:

Re: Where is the last window size and position of various Microsoft applications stored in Windows?

04 Dec 2022, 05:29

Sure, modify the keys as shown by copying the co-ordinates of the resolution of choice into the appropriate values pictured :
Keys.JPG
Keys.JPG (28.17 KiB) Viewed 1897 times
It won't show the folder as maximised, rather the folder as restored with maximum dimensions. Not a recommended method for multi-monitor setups. :P
:arrow: itros "ylbbub eht tuO kaerB" a ni kcuts m'I pleH

Return to “Off-topic Discussion”

Who is online

Users browsing this forum: No registered users and 34 guests