Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: configure windows to QUICKLY delete pagefile on shutdown? (not wipe)

4 Weeks Ago   #1

configure windows to QUICKLY delete pagefile on shutdown? (not wipe)

so I just discovered what may be one of the dumbest design choices ever if this is true: when configuring windows to clear the pagefile on shutdown (by flipping the ClearPageFileAtShutdown value in registry to 1) windows actually overwrites the entire file (with zeroes probably)
so obviously when that file's several gigs then it takes several minutes to shutdown

anyone found a way to instead tell windows to simply delete it instead? (like users can do by right-clicking delete with the mouse or typing "del pagefile.sys" in command line)

PS. I wanna delete that damn file on shutdown not for security reasons but practicality: so that when backing up with Ghost I don't have to delete it manually (which isn't possible to do in command line outside windows anyway)

also I've read that starting windows without previous pagefile seems to slightly improve performance or something, dunno if that's true

My System SpecsSystem Spec
4 Weeks Ago   #2

Windows 7 Home Premium 64 bit sp1

I might be wrong but I would think that Windows empties the Page file on shut down & this is often the reason shut down can be delayed.

A good back up program should not include the Page file as files in the Page file are going to vary all the time, so backing them up would seem futile.

Fiddling with the Page file will probably end up in tears as you really don't know what files are in it.
My System SpecsSystem Spec
4 Weeks Ago   #3

Windows 7 Pro 64 bit

I very much doubt Microsoft would provide an option to delete the pagefile on shutdown. Raymond Chen, a Microsoft developer since Windows 95 days, would call this a security hole disguised as a feature.

From a security standpoint, which is the entire purpose of the registry setting, deleting the pagefile would serve no real purpose. As is quite well known recovering a deleted file that has not been overwritten is not particularly difficult. For any hacker wishing to access the pagefile this would be a mere speedbump. Overwriting the pagefile is the only way to provide the security the setting was designed to provide. Windows will not allow deleting the pagefile while it is running. That would almost certainly result in a system crash.

Yes, overwriting a large pagefile will take time. That is why it is not enabled by default. In a high security environment this might be a good idea but it makes little sense outside a comprehensive security policy. Most computers have security holes more serious than an uncleared pagefile. The setting has no other benefits.

Most disk imaging software will either provide an option to not copy the pagefile or will not do it at all. Macrium Reflect simply will not copy the pagefile or hibernation file in an image backup.
My System SpecsSystem Spec


 configure windows to QUICKLY delete pagefile on shutdown? (not wipe)

Thread Tools

Similar help and support threads
Thread Forum
Can I delete pagefile.sys?
I have a file on my ssd called pagefile.sys it is taking up 16gb on my ssd I wanna know if it would be troublesome to delete it? I know that when my ram is full windows stores data in this file however if I delete it to get the disk space back will windows just create another one and restart the...
General Discussion
Quickly delete thousands of large files
I have a folder, and it has ~35,000 files in it, totaling about 90gb.. Is there any way for me to delete them all, permanently, and quickly? It takes 10seconds to 1min just to right click delete. I don't need them, I don't want them to go to the recycle bin, I just want them unlisted so I can...
Performance & Maintenance
PageFile.sys & Hiberfil.sys - Delete Safe?
Hello SF, I just do a drive clean-up (Deleting some junk files to free some space on my HDD) I managed to see the HD stats what files did takes a lot of space in it using WinDirStat app... I removed some games that I no longer played in a while and some backup files that already made a...
Performance & Maintenance
Does disabling pagefile.sys delete it from the system?
For security reasons, I want to delete the contents stored inside pagefile.sys securely with very slim chance of recovering it. I thought about backing up my files and doing a reformat of my PC and then using Eraser to wipe free space. But this is a time-consuming method. What is the fastest way to...
General Discussion
Possible to configure 7 to auto-wipe files?
Hello folks, I'm in the process of transitioning to Windows 7 and exploring the new capabilities that come with it. One feature I've long wondered about and considered potentially useful (but never actually ran into in the real world) is a OS/filesystem option which if enabled would cause the...
General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 16:39.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App