

Page File Deletion + Reallocation
[n590=Page File Deletion & Reallocation Tutorial]The following will instruct you on how to delete and reallocate the page file (c:\pagefile.sys).
Start by clicking on the applicable Windows OS:
◊ [goto=anchor0]Windows 8.1 + Windows 8[/goto]
◊ [goto=anchor1]Windows 10 + Windows 7 + Windows Vista[/goto]
[/n590]
[anchor=anchor0]
→ Windows 8.1 and Windows 8 - Bring up Search screen (press WIN + S keys) and type/paste sysdm.cpl; select the entry below it - (Windows 7 and Vista - see next step) -
[img400]https://www.sysnative.com/SysnativeTutorials/ControlPanel/win8/sysdm.cpl.png[/img400]
[/anchor]
[anchor=anchor1]
→ Windows 10, Windows 7 and Windows Vista - Click on START; type/paste sysdm.cpl into the Start Search box; select sysdm.cpl from the search listing results
[img400]https://www.sysnative.com/SysnativeTutorials/pagefile/page7.png[/img400]
[/anchor]
Click on "Advanced" tab; click on "Settings" (hover mouse over image to enlarge it) -
[img99]https://www.sysnative.com/SysnativeTutorials/pagefile/page1.png[/img99]
Click on "Advanced" tab; click on "Change" (hover mouse over image to enlarge it) -
[img99]https://www.sysnative.com/SysnativeTutorials/pagefile/page2.png[/img99]
1. Un-check "Automatically manage paging file size for all drives"
2. Check "No paging file" box
3. Click on "Set"
4. Click on "OK"
[img99]https://www.sysnative.com/SysnativeTutorials/pagefile/page3.png[/img99]
This screen will likely appear -- if so, press "OK" -
[img99]https://www.sysnative.com/SysnativeTutorials/pagefile/page5.png[/img99]
Re-boot your system.
[HR][/HR]
Next, we need to remove the "hidden" and "system" file attributes from the page file.
Bring up an Admin CMD prompt -
◊ Open an Elevated Admin Command Prompt (CMD) - Windows 10
◊ Open an Elevated Admin Command Prompt Window (Windows 8 / 8.1)
◊ Open an Elevated Admin Command Prompt Window (Windows 7/ Vista)
Type or paste the following into the CMD screen:
[CODE=333]attrib -s -h %systemdrive%\pagefile.sys[/CODE]
When complete, leave the CMD screen open for now.
Next - delete the page file.
You can use Windows Explorer -- locate c:\pagefile.sys, RIGHT-click on the file, press & hold the left SHIFT key down while clicking on DELETE. This is called a "hard delete" - it will bypass the Recycle Bin. A hard-delete is preferred as the page file may be too large for the Recycle Bin or in cases of low hard disk space.
My preferred method - delete the page file via CMD. Type/paste the following into the Admin CMD screen left open from the ATTRIB step. If you closed the CMD, screen, simply follow the instructions to open a new Admin CMD screen -
[CODE=333]del /a /q %systemdrive%\pagefile.sys[/CODE]
[n590=Deletion of Paging Files on Drives other than c: (System Drive)]Drive c: is the usual designation for the system drive (or "OS drive"). You can delete page file(s) from other drives or partitions via Windows Explorer or by substituting the drive letter for %systemdrive% in the CMD screen.
Example: To delete a paging file on drive j: - substitute j:\pagefile.sys for %systemdrive%\pagefile.sys
[/n590]
For info, %systemdrive% is an environment variable (ENV VAR). The system/OS drive/partition letter followed by a colon (:) is substituted by Windows for the ENV VAR as can be seen here by a simple CMD ECHO command - (hover mouse over image to enlarge it) -
[img800]https://www.sysnative.com/SysnativeTutorials/pagefile/page6.png[/img800]
[HR][/HR]
Time to reallocate the Page File/ Turn virtual memory back on.
Go back into the page file screen - follow the above steps except for the last one.
Check Box #1 to allow Windows to manage paging files; then click on OK -
[img99]https://www.sysnative.com/SysnativeTutorials/pagefile/page4.png[/img99]
You will likely see this screen:
[img99]https://www.sysnative.com/SysnativeTutorials/pagefile/page5.png[/img99]
Re-boot your system. Page file deletion and reallocation are now complete!
If you would like assistance, please start a new thread in the appropriate OS forum: Microsoft Support & Malware Removal - Sysnative Forums
[HR][/HR][HR][/HR]
Additional Information from Microsoft
▫ RAM, virtual memory, pagefile, and memory management in Windows
▫ RAM, Virtual Memory, PageFile and all that stuff
▫ Change the size of virtual memory - Windows Help
▫ How to determine the appropriate page file size for 64-bit versions of Windows
▫ What is virtual memory? - Windows Help
▫ Page File How big is Yours ? - Jane Lewis's Weblog - Site Home - TechNet Blogs