title: Windows 10 Compatibility Mode | Registry Key
body: <p>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).</p>
  
  <p>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. </p>
  
  <p>E.G.: C:\Program Files (x86)\MyApplicationDirectory\MyApp.exe</p>
  
  <p>The value of this key is ~WIN7RTM</p>
  
  <p>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.</p>
  
  <p>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)</p>
  
  <p><a href="https://i.stack.imgur.com/73ZFd.png" rel="noreferrer"><img src="https://i.stack.imgur.com/73ZFd.png" alt="enter image description here"></a></p>
  
  <p>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.  </p>
  
  <ol>
  <li>If I set the registry key, how do I verify the application is running in compatibility mode?</li>
  <li>Is there another way I can set the registry key and be sure it's running in compatibility mode?</li>
  </ol>