That information is stored in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Session Manager\Memory Managment
in the PagingFiles
value. It is a REG_MULTI_SZ
, and each string is of the form:
PAGINGFILEPATH StartSize MaxSize
So, for example, I set my C drive to be 16384 MB for both sizes, the key data would look like:
L"C:\pagefile.sys 16384 16384\0"
NOTE2: It's possible to omit the numbers, in which case the system manages the size of the page file on the specified drive.
NOTE: The value specified there is not the value the system is currently using, but the value that will be used upon system reboot. This is because the paging file generally cannot be changed once the system is running, except to expand the paging file. So if the user would have changed the setting but not rebooted, that key would contain the settings for after reboot, not the settings currently in effect.
If you want the settings currently in effect you can check the sizes of pagefile.sys
on each of the drives. That won't give you the max size but it will at least give you an idea.