Locate or create a directory for the Pagefile.sys file. This could be the Winnt directory, which by default should have System Full access.
Make sure that this directory has System Full access and that all previous directories including the root have at least System Read access.
Start Regedt32. Select the HKEY_LOCAL_MACHINE on Local Machine subtree, and search for the following subkey:
SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
On the right side of the window, choose the PagingFiles :REG_MULTI_SZ: value.
Either double-click it, or from the Edit menu, choose Multi String.
Edit the string, and insert the full path for where you would like the Pagefile.sys file to reside. For example, change C:\Pagefile.sys 44 100 to C:\Winnt\Pagefile.sys 44 100. (Here 44 refers to the minimum pagefile size and 100 the maximum.)
Exit Regedt32.
Restart the computer, and check to make sure Pagefile.sys appears in the correct location. Then delete the Pagefile.sys file in the root directory as this file is no longer be used.