Click to See Complete Forum and Search --> : Hidden Pagefile Partition


scutterboy
November 15th, 2002, 09:00 AM
I did this in Xp pro but this should work for 2K and XP.
The idea was to create a swapfile folder that my users couldn't fill with junk. Thus keeping an unfragmented file that is still managed by windows.

Step 1
In disk managment you create a partition and mount it to an NTFS folder. (Mount points are part of NTFS 5)

Create a folder, I'll call this one c:\swap
In disk management create a partition large enough to hold your pagefile. I created a 2Gig partition.
Instead of assigning a drive letter the partition is mounted as c:\swap
This gives a folder that is actualy it's own partition

Step2
The next stage is getting the swapfile off the root and into the subfolder

run regedt32 and go to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Session Manager\Memory Management
Alter the pagefile key from "c:\pagefile.sys" To "c:\swap\pagefile.sys"

Step3
Reboot and you can delete the old file on c:\
Thats the file in place and working. Because my users have admin rights to the systems I also needed to deny access to the user and hide the folder for good measure,

Step4
Security and Visibility.
I've denied the local administrator group and the user access to the folder so only the domain administrator and the local administrator have access.

Next I chose to change the folder attributes to a system folder so that by default the user cant even see the folder in explorer.

in a dos prompt.
c:\
attrib +s +h c:\swap


That's it. Hope it is usefull to others too.

scutterboy
November 4th, 2004, 01:58 PM
I have continued to use this trick and have found it very reliable.
Systems seem to run better for longer.
I can confirm that is just the same in Win2K or XP pro.

Further Explanation.
The purpose of the dedicated Pagefile partition is to aviod page fragmentation.
Mounting and then hiding the partition prevents users from getting in and messing up that partition.

additional optional step.
I sometimes run secpol.msc and set the value to clear the pagefile on shutdown.
I haven't tested to see if this has any real benefit though.

natcom
November 8th, 2004, 10:46 AM
thank you so much nice trick :)

scutterboy
January 20th, 2005, 08:22 PM
thank you so much nice trick :)

Very welcome mate.