How to Set Compatibility Mode in Regedit
Running legacy applications on modern versions of Windows often
requires compatibility shims to emulate older operating environments or
enforce specific execution parameters. While these options are usually
configured through the file properties graphical interface, you can
manually configure and automate them using the Windows Registry Editor
(regedit). This guide explains how to locate the registry
compatibility layers, create the appropriate values, and apply the
correct compatibility flags to any target executable.
Step 1: Open the Registry Editor
- Press
Windows Key + Rto open the Run dialog box. - Type
regeditand press Enter or click OK. - If prompted by User Account Control (UAC), click Yes to grant administrative permissions.
Step 2: Navigate to the Compatibility Layer Key
Choose whether you want to apply the compatibility shim to the currently logged-in user or to all users on the computer:
- Current User Only:
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers - All Users (System-wide):
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
Note: If the Layers key does not exist under
AppCompatFlags, right-click AppCompatFlags,
select New > Key, and name it
Layers.
Step 3: Add the Executable Path
- Select the
Layerskey in the left sidebar. - Right-click on an empty space in the right pane.
- Select New > String Value.
- Set the Value name to the full file path of your
legacy executable (for example:
C:\Program Files (x86)\LegacyApp\app.exe).
Step 4: Define the Compatibility Mode Flags
- Double-click the newly created string value to open the Edit String dialog.
- In the Value data field, enter a tilde
(
~) followed by the desired compatibility flag(s) separated by spaces. - Click OK to save the changes.
Common Compatibility Flags
- Operating System Emulation:
- Windows 95:
~ WIN95 - Windows 98 / Windows ME:
~ WIN98 - Windows XP (Service Pack 2):
~ WINXPSP2 - Windows XP (Service Pack 3):
~ WINXPSP3 - Windows Vista (Service Pack 2):
~ VISTASP2 - Windows 7:
~ WIN7 - Windows 8:
~ WIN8RTM
- Windows 95:
- Display & Privilege Modifiers:
- Run as Administrator:
RUNASADMIN - Run in 256 Colors:
256COLOR - Run in 640x480 Screen Resolution:
640X480 - Disable Fullscreen Optimizations:
DISABLEDXMAXIMIZEDWINDOWEDMODE - High DPI Scaling Override (Application):
HIGHDPIAWARE
- Run as Administrator:
Combining Flags Example
To run an application in Windows XP SP3 mode with administrator
rights and 640x480 resolution, set the value data to:
~ WINXPSP3 RUNASADMIN 640X480
Step 5: Test the Configuration
Close the Registry Editor and launch the executable. The application
will immediately run using the compatibility shims defined in the
registry without requiring a system reboot. To remove the compatibility
mode later, simply delete the string value you created from the
Layers registry key.