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

  1. Press Windows Key + R to open the Run dialog box.
  2. Type regedit and press Enter or click OK.
  3. 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:

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

  1. Select the Layers key in the left sidebar.
  2. Right-click on an empty space in the right pane.
  3. Select New > String Value.
  4. 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

  1. Double-click the newly created string value to open the Edit String dialog.
  2. In the Value data field, enter a tilde (~) followed by the desired compatibility flag(s) separated by spaces.
  3. Click OK to save the changes.

Common Compatibility Flags

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.