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
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
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.microsof...y/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.
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, 20 April 2014 - 07:09 PM.