TheInfamousOne
TheInfamousOne

Reputation: 205

Windows 10 Compatibility Mode | Registry Key

I'm currently packaging an application to run in compatibility mode. I easily found the location where the registry keys are created in the HKLM (for all users) or HKCU (for only the logged on user).

The problem is; which I really don't know if it's a problem, I can set the registry key in HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers. I create a REG_SZ with the name of the key being the path.

E.G.: C:\Program Files (x86)\MyApplicationDirectory\MyApp.exe

The value of this key is ~WIN7RTM

The problem is this, when I install the application and I create a registry key with this path. I can click on the shortcut properties and go into the Compatibility Tab and noticed it does not appear it's set to run in Compatibility Mode in Windows 7.

I know I created the correct registry key because I originally created the shortcut through the compatibility tab and clicked "Change Settings for All Users" and then set it to run in Windows 7 there. If I set compatibility mode within the shortcut, I can see it checked. (highlighted in yellow)

enter image description here

But if I try to set compatibility mode via the registry key and I go into the properties of the EXE or shortcut, the box is not checked.

  1. If I set the registry key, how do I verify the application is running in compatibility mode?
  2. Is there another way I can set the registry key and be sure it's running in compatibility mode?

Upvotes: 6

Views: 16898

Answers (1)

TheInfamousOne
TheInfamousOne

Reputation: 205

Never mind folks. I did a stare and compare on the registry keys that is created. I did not add a space between the ~ and WIN7RTM. Once I added a white space, it worked fine.

Before: ~WIN7RTM (not correct)

After: ~ WIN7RTM (correct)

Overlooked it.

Upvotes: 7

Related Questions