Hey there!
Nice to meet you! I'm Randy, an Independent Advisor.
The SwapfileControl key in the Windows registry controls the swapfile.sys, which is different from pagefile.sys. The swapfile is used mostly for suspending Microsoft Store apps (UWP apps). It’s usually hidden from view, but you can find it in the same folder as the pagefile on your system drive.
To turn off swapfile.sys, go to this registry path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management Then find the SwapfileControl key and set its value to 1 (this disables it).
If you want to disable pagefile.sys, which is used for general system memory management, go to the same location in the registry and edit the PagingFiles entry. Just delete its value completely so it’s blank. After that, restart your PC.
These options are hidden in the GUI and command line because Microsoft doesn’t want most users touching them. Disabling the pagefile or swapfile can cause system crashes or problems with certain apps, and Windows tries to protect users from that. Most people don’t need to change these settings anyway, since Windows manages memory pretty well on its own.
Hope that this helps.
Best regards,