Jump to content

Workaround to hiding pagefile.sys under Windows NT 3.51/NT 4.0


ppgrainbow

Recommended Posts

For those who are playing around with Windows NT 3.51 or Windows NT 4.0 (Workstation and Server), pagefile.sys sits on the root directory of drive C (or drive D) and by default there is no way how to hide pagefile.sys and if the you set the attributes to hidden, the pagefile.sys will get unhidden at reboot.

But I provided a workaround on how to hide pagefile.sys. Here's how:
1. Under Windows NT 4.0 (Workstation and Server), create a new directory called \SWAP.
2. Using File Manager or Windows NT Explorer, set the attributes of the \SWAP directory to hidden.
3. Click on the Start menu and click on Run.
4. In the Run dialog box command line, type REGEDIT to invoke the Registry Editor and locate the following keys:

Key Name: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management

Value Name: PagingFiles
Type: REG_MULT_SZ
Data: 43 3A 5C 70 61 67 65 66 69 6C 65 2E 73 79 73 39 36 20 31 34 34 (C:\pagefile.sys 96 144)

5. Double click on the following key to edit the keys mentioned above. When that happens, this will bring up the Edit Binary Value dialogue box where it contains the two hexadecimal values which resembles ANSI characters and the Data field.
6. In the Data field, you will need to change the path of the pagefile to reflect this change:

Data: 43 3A 5C 53 57 41 50 5C 70 61 67 65 66 69 6C 65 2E 73 79 73 39 36 20 31 34 34 (C:\SWAP\pagefile.sys 96 144)

In Windows NT 3.51 (Workstation and Server), the procedure to hide pagefile.sys is slightly different from Windows NT 4.0. Here's how to hide the pagefile:
1. Create a new directory called \SWAP.
2. Using File Manager, set the attributes of the \SWAP directory to hidden.
3. In Program Manager, go to File and select Run.
4. In the Run dialog box command line, type in REGEDT32 to invoke the Registry Editor.
5. Select the HKEY_LOCAL_MACHINE on Local Machine window and locate the following keys:

Key Name: HKEY_LOCAL_MACHINE\SYSTEN\CurrentControlSet\Control\Session Manager\Memory Management

Value Name: PagingFiles

Type: REG_MULTI_SZ
Data: C:\pagefile.sys 48 72

6. Double click on the following key to edit the keys mentioned above. When that happens, this will bring up the Multi-String Editor dialogue box.
7. In the Data field, change the directory of where the pagefile.sys will reside:

C:\SWAP\pagefile.sys 48 72

(Optionally, you can set the minimum and maximum file size values (in megabytes). The limit on the size of the registry has a effect on the maximum pagefile size. The maximum value allowed is 4,095.)

More information on changing the location of the pagefile: http://msdn.microsoft.com/en-us/library/ms912851.aspx

The pagefile.sys is hidden by default in Windows 2000 and up. If you have any more information as well as workarounds to hiding pagefile.sys, please let me know.

smile.gif

Update: I had to change the font size to 12 pixels to make the reading of the text in the workaround instructions more readable.

Edited by ppgrainbow
Link to comment
Share on other sites


It's funny because in Win2k you can't normally UNhide the file.

If you can edit the properties under WinNT 3/4 then another workaround would be to run:


attrib +h c:\pagefile.sys

on every boot.

Edited by tomasz86
Link to comment
Share on other sites

It's funny because in Win2k you can't normally UNhide the file.

If you can edit the properties under WinNT 3/4 then another workaround would be to run:


attrib +h c:\pagefile.sys

on every boot.

Well, if I use the Command Prompt to change the attributes for C:\pagefile.sys to Hidden (attrib +h c:\pagefile.sys), I end up getting the following error message:

Unable to change attribute - C:\pagefile.sys

This is often because the pagefile is locked while Windows NT 3.x/4.0 is running.

Link to comment
Share on other sites

@tomasz86

Last time I checked pagefile.sys was a system file, cannot really remember on NT or 2K. :unsure:

http://ss64.com/nt/attrib.html

I presume that you would need anyway to turn the System state to off before being able to hide it (and reset it to System in the "same go"), but the file should be in use anyway and thus possibly allow you not to change it's status....

jaclaz

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...