1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

pagefile deletion

Discussion in 'Windows XP' started by mklangelo, 2006/01/02.

  1. 2006/01/02
    mklangelo

    mklangelo Inactive Thread Starter

    Joined:
    2005/07/01
    Messages:
    41
    Likes Received:
    0
    I have moved my pagefile to another physical disk. I have set the pagefile for C: to "None" hit the "Set" radio button. The pagefile does indeed exist on the E:\drive. But it also still exists on the C: drive. I have rebooted 20 times since doing this. I can't defrag the C: drive because the pagefile is still there according to Explorer and Defrag utility. According to the system properties, it's isn't there.


    What's the deal with that?

    Thanks in advance.

    :eek:

    PS. Is there the equivelant of FDisk for NTFS? Then I could get at the pagefile when it wasn't in use. Is there anyway to reboot XP Pro into command line interface without the OS running?
     
  2. 2006/01/02
    McTavish

    McTavish Inactive

    Joined:
    2005/06/24
    Messages:
    576
    Likes Received:
    1
    Often times the page file itself will still remain on the partition even after turning it off. All you have to do is delete it yourself. It’s a hidden system file so you will have to show all files to see it "“ pagefile.sys. You’ll find it beside the Windows, Program Files and Documents and Settings folders.

    In any folder click Tools>Folder Options>View and check’Show hidden files and folders’ and uncheck "˜Hide protected operating system files…’ Also uncheck "˜Hide extensions for known file types’ or you will only see the file as "˜pagefile’ instead of as "˜pagefile.sys’

    If you have turned it off you will be allowed to delete it. If it’s still in use you won’t be allowed to.

    In case any 2K users are reading this be warned that any mistakes when altering the pagefile can make the OS unbootable. Removing it is also fatal. XP can recover from most pagefile errors.
     

  3. to hide this advert.

  4. 2006/01/03
    mklangelo

    mklangelo Inactive Thread Starter

    Joined:
    2005/07/01
    Messages:
    41
    Likes Received:
    0
    Thanks for the reply McTavish. According to System Properties, there is no pagefile in the C: drive. But I sure as hell can't delete it, or rename it. Been there done that...
     
  5. 2006/01/03
    rsinfo

    rsinfo SuperGeek Alumni

    Joined:
    2005/12/25
    Messages:
    4,076
    Likes Received:
    178

    mklangelo,

    There is no way to boot into normal (Win9x) type command line interface, but you CAN boot into 'Safe Mode Command Prompt'. While the system is booting, press F8. You would be taken to a menu - choose 'Safe Mode Command Prompt'. Login as administrator and you can do whatever you like (within limits - of course).
     
  6. 2006/01/03
    McTavish

    McTavish Inactive

    Joined:
    2005/06/24
    Messages:
    576
    Likes Received:
    1
    Do you get a message box when you try and delete the pagefile.sys file? You do have to reboot after turning it off before it gets released. I’ve done it hundreds of times. It's not a lack of administrator privileges is it?
     
  7. 2006/01/03
    mklangelo

    mklangelo Inactive Thread Starter

    Joined:
    2005/07/01
    Messages:
    41
    Likes Received:
    0
    I'm pretty sure the pagefile is in use when in Safe Mode. :D
     
  8. 2006/01/03
    mklangelo

    mklangelo Inactive Thread Starter

    Joined:
    2005/07/01
    Messages:
    41
    Likes Received:
    0
    I have rebooted many, many time since doing this as stated in the original post. This has been going on for about a month. I am unable to delete pagefile.sys or rename it... I am the only user on this machine so I'm the Administrator. I installed the OS and set up no other user accounts.
     
  9. 2006/01/03
    Whiskeyman Lifetime Subscription

    Whiskeyman Inactive Alumni

    Joined:
    2005/09/10
    Messages:
    1,772
    Likes Received:
    37
  10. 2006/01/03
    oshwyn5

    oshwyn5 Inactive

    Joined:
    2005/08/25
    Messages:
    736
    Likes Received:
    0
    When you defrag, where do you think that the files getting moved are saved until the place they are going to go is ready? The Page (Swap) file.

    If you are using NTFS file system and you are using the built in XP defrag utility which is based on Executive Software's Diskkeeper lite; there is no need to defrag the page file. IT is not moveable because the disk management utility component which is used by this defrag tool places it at the fastest place it can find on the hard drive . Stuff in swap file is saved to its correct location as part of the shutdown proceedure and new items load there as part of prefetch.

    If you feel a need to defrag your pagefile you can use
    http://www.sysinternals.com/Utilities/PageDefrag.html

    No longer free, but worth $8
    http://www.majorgeeks.com/download4083.html
    X-setup pro is worth having. You can set it to wipe (overwrite) the page file on shutdown.
     
  11. 2006/01/03
    mklangelo

    mklangelo Inactive Thread Starter

    Joined:
    2005/07/01
    Messages:
    41
    Likes Received:
    0

    Well, all I'm saying is my C: drive is never less than 46% fragmented, no matter how many times I defrag. Pagefile.sys also shows up in the graphical representation in Windows Defrag as a red area and not to mention in the defrag report as a file that is unable to be defragmented. That should not be the case.


    BTW Oshwyn, thanks for the links!
     
  12. 2006/01/03
    WhitPhil

    WhitPhil Inactive

    Joined:
    2002/01/07
    Messages:
    599
    Likes Received:
    4
    I don't think so!

    It's not moveable, because the XP defrag program does not have the smarts to move it. And, it certainly doesn't get involved in its placement.

    Eh? What "stuff" in the swapfile?

    Prefetch and the swapfile are not related.

    mkangelo

    When you try to delete or rename the file, what happens or what message are you getting?
    And, have you tried just leaving it on C:\ and changing the size to minimal like 50MBs and forgetting about it?
     
  13. 2006/01/03
    TonyT

    TonyT SuperGeek Staff

    Joined:
    2002/01/18
    Messages:
    9,072
    Likes Received:
    400
    Try this:

    Config system so the pagefile gets cleared at shutdown. It could be that something IS in the C:\pagefile and is still in use. (check your Event logs to verify)

    Create this regkey, you can change it back afterwards if c: pagefile no longer shows up anywhere.

    Code:
    [Start] [Run] [Regedit]
    Registry Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
    Modify/Create the Value Data Type(s) and Value Name(s) as detailed below.
    Data Type: REG_DWORD [Dword Value] // Value Name: ClearPageFileAtShutdown
    Setting for Value Data: [0 = Clear Page File Disabled / 1 = Clear Page File Enabled]
    Exit Registry and Reboot
     
  14. 2006/01/03
    mklangelo

    mklangelo Inactive Thread Starter

    Joined:
    2005/07/01
    Messages:
    41
    Likes Received:
    0

    The message is:

    Cannot Delete Pagefile.

    It is being used by another person or program.

    Close any programs that might be using the file and try again.



    System Properties shows the pagefile I created on the E: drive. I set the one on C: to 50 MB, rebooted and was able to defrag. I said, well, why don't I see how small I can make it so I set it to 2MB. I rebooted and now tried to defrag again. The defrag report says I have a 3GB pagefile. LOL the one on the E: drive is still there at the size I set it to.
     
  15. 2006/01/03
    WhitPhil

    WhitPhil Inactive

    Joined:
    2002/01/07
    Messages:
    599
    Likes Received:
    4
    Interesting. Because that is not the error that I get if I attempt to remove it.
    (or were you just paraphrasing the message(s)?)

    You don't have some other "file protection" app running?

    When I attempt a delete, the first message is
    "The file pagefile.sys is a system file. If you remove it, your computer or one of your programs may no longer function. Are you sure you want to move it to the recycle bin? "

    Then if I OK that I get
    "Cannot delete pagefile.sys: Access is denied. Make sure the disk is not write protected and that the file is not currently in use "

    You could try Process Explorer and see if it sheds any light on what may still have it open.

    And/or you can try this trick to do the delete via a CMD prompt, in the event Explorer is getting in the way.
     
    Last edited: 2006/01/03
  16. 2006/01/03
    mklangelo

    mklangelo Inactive Thread Starter

    Joined:
    2005/07/01
    Messages:
    41
    Likes Received:
    0
    No, that was the message verbatim.


    I guess I'm going to be happy with a 50MB pagefile on C: and a second one on E:. I don't think it will do any harm. C: is now properly defragged. The system is running fine.


    All I had running was Spybot-AD Resident and AntiVir. I doubt AntiVir was doing anything with the pagefile and Spybot I'm not sure since I haven't tried it since I've had it at 50MB.

    I appreciate the input everybody.

    ;)

    PS> On that little trick. I ran accross that the other day. I was just too lazy to try it... LOL
     
  17. 2006/01/03
    WhitPhil

    WhitPhil Inactive

    Joined:
    2002/01/07
    Messages:
    599
    Likes Received:
    4
    Try Process Explorer. From the web, it would seem that the error you are seeing IS because an app somewhere, still has the file in use. At least, PE should tell you who that app is.

    And, if that trick did work, you know the culprit was Explorer.
     
  18. 2006/01/03
    mklangelo

    mklangelo Inactive Thread Starter

    Joined:
    2005/07/01
    Messages:
    41
    Likes Received:
    0
    PE says the System is using it. Of course, I have a 50 MB pagefile on C: so of course it'll be used. System Properties shows the pagefile I set up on E: exists but the System isn't using that one...
    I'll try setting no pagefile on C: tomorrow and then use PE. I'll make a post.
     
  19. 2006/01/03
    rsinfo

    rsinfo SuperGeek Alumni

    Joined:
    2005/12/25
    Messages:
    4,076
    Likes Received:
    178
    Yes mklangelo. The page file is in use - but this was the answer to your query about DOS mode :mad:
     
  20. 2006/01/04
    skeet6961

    skeet6961 Inactive

    Joined:
    2005/09/03
    Messages:
    522
    Likes Received:
    0
    can't remember the last time i defragged any drive ... i just don't bother much w/ it anymore but ... a shot in the dark guess = boot the OS installer Cd, choose Repair for the console and kill it from there.

    also may be interested in the tweaking/pagefile post of recent. most pagefile tweaks aren't worth the time is the general gist. curious as to the reason to bother w/ pagefile.sys but ... i guess that some progs may get something from it.
     
    Last edited: 2006/01/04

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.