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 the registry editorType regedit in the Windows search and open the registry editor.
- Navigate to the right keyNavigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management.
- Wert ‚PagingFiles‘ finden: Finde den Eintrag ‚PagingFiles‘. Dieser bestimmt den Speicherort und den Namen der Pagefile.sys.
- Make changes: Doppelklicke auf ‚PagingFiles‘ und gib den neuen Pfad sowie den Dateinamen an, beispielsweise D:\unterordner\pagefile01.sys.
- Save changes: Klicke auf ‚OK‘ und schließe den Registrierungseditor.
- Reboot system: A restart of your computer is required for the changes to take effect.
When can changing the Pagefile.sys with regedit be useful?
The editing of the Swap 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 location and file name of the 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 configurationsIn 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 scriptingFor 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 advisedChanges to the registry can have a significant impact on your system. Therefore, proceed carefully and understand exactly what you are doing.
- Backup of the registryIt is advisable to create a backup of the registry before making any changes in order to be able to restore it in the event of problems.
- System monitoringMonitor your system closely after the restart to ensure that everything is working smoothly.

