Would you like to move the Pagefile.sys to a specific folder? Or set this file via the registry for more complex system configurations such as multi-boot and networks? Here we provide instructions on how to change the file path and file name of the system file via regedit.
Quick overview:
To change the Pagefile.sys via the registry (directory and file name)
While the advanced system settings usually only allow you to change the size and activate/deactivate the Pagefile.sys in Windows, the registry offers more options.
This is a more advanced method that requires precise handling, but don't worry - we'll guide you safely through every step:
- Open registry editor: Type regedit into the Windows search and open the registry editor.
- Navigate to the correct key: Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management.
- Find value 'PagingFiles': Find the entry 'PagingFiles'. This determines the location and name of the Pagefile.sys.
- Make changes: Double-click on 'PagingFiles' and enter the new path and file name, for example D:\subfolder\pagefile01.sys.
- Save changes: Click on 'OK' and close the registry editor.
- Restart system: A restart of your computer is required for the changes to take effect.
When can changing the Pagefile.sys with regedit be useful?
Editing the paging file via the Windows registry instead of the advanced system settings can be more useful in the following cases:
- Specific requirements for storage location and file name: The registry allows a more detailed and specific configuration of the storage location and file name of Pagefile.sys. This can be useful if you want to place the Pagefile.sys in a specific directory, which is not directly possible via the system settings.
- Complex system configurations: In complex or customized system configurations, such as multi-boot systems or in network environments, customization via the registry may be necessary to avoid conflicts with other operating systems or network policies.
- Automation and scripting: For IT professionals who want to make changes to multiple systems or automate configurations, the registry offers the option of using scripts that access the registry settings directly.
What must be observed when editing the registry?
- Caution is advised: Changes to the registry can have a significant impact on your system. Therefore, proceed carefully and understand exactly what you are doing.
- Backup of the registry: It is advisable to create a backup of the registry before making any changes so that you can restore it in the event of problems.
- System monitoring: Monitor your system closely after rebooting to make sure everything is running smoothly.
Founded Windows Tweaks as a teenager in the 90s. His helpful PC tricks made it Germany's most visited Windows site (at the time Sandro looked like this). He then went on to write elsewhere, for example for PC-Praxis, Computer Bild and PCWorld in the USA. Microsoft also poached him from us. Now Sandro is back, finally sharing his tweaks here again. For a stress-free digital everyday life. You can reach Sandro via e-mail.

Hello & welcome 👋
On Windows Tweaks you will find time-saving tech guides for PC, software & Microsoft. For a stress-free digital everyday life. Already we have been "tweaking" Windows since 1998 and just won't stop!
On Windows Tweaks you will find time-saving tech guides for PC, software & Microsoft. For a stress-free digital everyday life. Already we have been "tweaking" Windows since 1998 and just won't stop!
New Windows Guides