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: How to create user-defined pagefile.sys when the normal method fails


06 Apr 2013   #1

Win7-64
 
 
How to create user-defined pagefile.sys when the normal method fails

My system is Windows 7-SP1 with 2 SSD's and 2 HDD's. What I want to do is keep the pagefile.sys file off my SSD boot drive and put it on the other SSD. But the standard method to do this does not work - when I use the Virtual Memory dialog to set up a page file on my non-boot SSD the dialog says it is created ok, but in fact no file is created.

There is no error message generated, but if I try to put the pagefile.sys on my non-boot SSD Windows creates a new one on the boot drive immediately after restarting. This is because there never was a pagefile.sys created on the non-boot SSD.

Right now I have the page file on one of my HDD's and it works fine there (at least it seems to - how can anyone really tell?) and I have no page file on my boot SSD. But I'd rather have the pagefile.sys on my second SSD instead.

The following techniques do NOT WORK:

1. Copying pagefile.sys from it's current location to the SSD. Windows won't copy it because it says it is in use.

2. Booting off the Windows 7 DVD and using the System Repair Command window to copy pagefile.sys. This fails because the command window does not see or list pagefile.sys.

3. Restore from backup to alternate location. This fails because my backup program (Paragon 12) does not back up the pagefile.sys file or the Recycle Bin and a few other "system" files like that.

I'm hoping there is some obscure DOS command (or something) that supports the creation of a pagefile.sys from the command prompt. Or perhaps some utility program will do it?

My System SpecsSystem Spec
.

06 Apr 2013   #2

Windows Server 2008 R2
 
 

pagefile.sys can't be copied, as there's a persistent handle opened to the file during boot and is only destroyed on shutdown - given it only holds memory pages for the duration of the running OS session, copying it doesn't seem to make much sense anyway.

The way you "move" the paging file using the sysdm.cpl dialog is to first set the system to "no paging file", rebooting, and then setting a paging file on a different volume (and rebooting again). Assuming you do these steps, it should create a pagefile.sys on the specified volume and get rid of the one on the other. To be sure though, make sure you are using the dir /A command to view the root of the drive that should contain a paging file (pagefile.sys).
My System SpecsSystem Spec
06 Apr 2013   #3

Win7-64
 
 

Indeed.

"Should" is the key word - doing what you said (and I have done exactly that several times) results in the following 2 things happening:

1. No page file is created on the non-boot SSD (even though the dialog says there is.)
2. Windows creates a new pagefile.sys on the boot drive as soon as it boots.

However, I did discover the following weirdnesses:

1. Whether or not the paging configuration actually changes depends on exactly how you deal with the OK and Apply buttons on the paging dialog. In essence, if you don't get the popup message saying you have to reboot to make changes effective they don't get made, even if you do reboot.

2. Using a variety of dialog responses I was finally able to get a pagefil.sys created on me non-boot SSD. To do this I had to create another pagefile.sys on a HDD; doing this was the only way I could avoid having Windows create it's on pagefile.sys on my boot SSD.

3. Even though I had a pagefile.sys on the non-boot SSD Windows would not recognize it. After I eliminated the HDD pagefile.sys, on reboot Windows went right ahead and created it's own pagefile.sys on the boot SSD.

4. Thinking there was some sort of ownership/rights problem with the non-boot SSD's pagefile.sys I tweaked it's permissions to add my own user ID. I also ran a "Take Ownership" on the file, but this did not help - Windows still refused to recognize it.

5. I was able to eliminate all paging and I'm considering doing this. I did read once that Windows 7 loses a little performance when there are no page files, but who knows if this is really true.

As I said, it seems I need to find a way to create a pagefile.sys that does not use the standard technique. The real mystery is why, even after creating it using the standard method, Windows will not recognize the pagefile.sys on the non-boot SSD.
My System SpecsSystem Spec
.


08 Apr 2013   #4

Windows Server 2008 R2
 
 

Quote   Quote: Originally Posted by bbinnard View Post
5. I was able to eliminate all paging and I'm considering doing this. I did read once that Windows 7 loses a little performance when there are no page files, but who knows if this is really true.
It's true, but not in the way you might think (memory management and the modified page writer are changed in their behavior, and there are risks with the kernel if you don't set a particular registry value to disable paging of the kernel executive, which in and of itself runs it's own risks when set.....). The memory manager might be a mystery to a lot of people, but it's actually quite well documented for anyone who wants to learn.

Quote   Quote: Originally Posted by bbinnard View Post
As I said, it seems I need to find a way to create a pagefile.sys that does not use the standard technique. The real mystery is why, even after creating it using the standard method, Windows will not recognize the pagefile.sys on the non-boot SSD.
That's really odd, and I'd wonder if there's something about that drive (during boot) that causes the pagefile.sys creation to fail - if it says it created it and needs a reboot, but then doesn't create it (and puts it back on the SSD), there's probably something causing it to fail during boot (and I'd wager it's hardware-driven, not software, but without a boot debug it'd be hard to be entirely certain).
My System SpecsSystem Spec
Reply

 How to create user-defined pagefile.sys when the normal method fails




Thread Tools




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 06:30 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33