Page File Deletion + Reallocation
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:
Start by clicking on the applicable Windows OS:
→ 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) -
→ 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
Click on "Advanced" tab; click on "Settings" (hover mouse over image to enlarge it) -
Click on "Advanced" tab; click on "Change" (hover mouse over image to enlarge it) -
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"
This screen will likely appear -- if so, press "OK" -
Re-boot your system.
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:
attrib -s -h %systemdrive%\pagefile.sys
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:
del /a /q %systemdrive%\pagefile.sys
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
Example: To delete a paging file on drive j: - substitute j:\pagefile.sys for %systemdrive%\pagefile.sys
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) -
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 -
You will likely see this screen:
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
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