📎 AI Summary:
The thread discusses methods to disable or manage Pagefile.sys in Windows without using the System dialog, focusing on whether a registry key can control its configuration. The original poster seeks a way to completely disable the page file, ideally retaining previous settings, rather than just deleting the file, and questions if registry edits suffice. A contributor suggests that registry modifications alone are insufficient and recommends using WMI commands via the command line to manage page file settings, while another warns against disabling the page file entirely, as Windows relies on it for system stability and error logging. Overall, the discussion highlights that while certain manual or scripting options exist, caution is advised when disabling or significantly altering the page file.

pstein

Extraordinary Member
Joined
Mar 20, 2010
Messages
454
Thread Author #1
Is there a way NOT to enable + disable Pagefile.sys through Systems dialog but with a Registry key?

When enabling from disbaled state it should take the previously (eventually in the past) set partition location and file size.

If this is not possible then pagefile.sys should be set to "system managed".

Be aware: I am NOT talking about just a deletion of pagefile.sys at shutdown but a complete disabling!

Peter
 

Josephur

Windows Forum Admin
Staff member
Premium Supporter
Microsoft Certified Professional
Joined
Aug 3, 2010
Messages
1,283
Registry key wouldn't do you too well as you often need to reboot when adjusting page file settings for them to take effect.

You can however invoke WMI to manage it from the command line using WMIC. This should be done at an administrative command prompt, once you get it figured out you could quickly create a few batch files to do your pagefile bidding.

To query for current settings:
wmic pagefile list /format:list

To create a new page file:
wmic pagefileset create name="C:\pagefile.sys"
wmic pagefileset where name="C:\pagefile.sys" set InitialSize=4096,MaximumSize=4096
wmic pagefileset where name="C:\pagefile.sys" delete

You will also want to look at the pagefileset DELETE command for your needs.

To get help type wmic COMMAND /? for instance, wmic pagefile /?
 

Last edited:

ussnorway

Windows Forum Team
Staff member
Joined
May 22, 2012
Messages
4,598
Fyi you can also share a pagefile across many systems on a dual/multi-boot computer but to be clear Windows is designed to run with a pagefile and expects there is one when doing tasks... having no page file can bugger up some error logging senarios and I don't recommend it for most people.