- 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
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
- Joined
- Aug 3, 2010
- Messages
- 1,286
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 /?
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 /?
- Joined
- May 22, 2012
- Messages
- 4,394
Similar threads
- Replies
- 0
- Views
- 2K
- Solved
- Replies
- 1
- Views
- 867
- Replies
- 2
- Views
- 4K
- Replies
- 12
- Views
- 13K
- Locked
- Replies
- 1
- Views
- 18K