How can I remotely change the size of a pagefile?

A. Pagefile information is stored in the registry as a multi_string (so you HAVE to use regedt32.exe) and can be changed locally as follows:

  1. Start the registry editor (regedt32.exe)
  2. Move to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
  3. Double click PagingFiles
  4. There is one line for each page file, the format is
    <location> <initial size> <maximum size>
    C:\pagefile.sys 120 140
    Click here to view image
  5. Click OK
  6. Close the registry editor
  7. Reboot the machine

To change on another machine you should use the resource kit REG.EXE utility but the command below will replace the current page file and will NOT check you have enough disk space so you may want to create a script that does check. Make sure the machine is rebooted after the change.

C:\&gt; reg update "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager\Memory Management\PagingFiles"="&lt;location&gt; &lt;initial
size&gt; &lt;max size&gt;" \\&lt;remote machine&gt;

For example:

C:\> reg update "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PagingFiles"="C:\pagefile.sys 120 140" \\

Make sure you test this before trying to use on live machines.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.