title: How to use manifest to control disable DPI scaling and compatibility
body: <p>I have a manifest file and use the mt command in makefile to add it into one of my exe files. After it's installed. If I use DPI Awareness Enabler or check the registry in HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers, it does NOT show anything interesting. Normally if I manually set Compatibility to Windows 7 and disable DPI scaling in file property, it would show up in DPI Awareness Enabler and the registry.</p>
  
  <p>So am I right to assume register is linked only to GUI not the actual file? As if I use mt command to extract manifest file from exe, I can see my original manifest file.</p>
  
  <p>Above all, I don't think my manifest file works as expected. The way I test it is to reproduce a bug in the app. The workaround is set Compatibility to Windows 7 and disable DPI scaling in file property. If I just use the installed file even with manifest file embeded, it doesn't solve the problem. But if I manually change it in property, it solves the bug.</p>
  
  <p>Some extra information, the app is built with VS2010 with hotfix to fix the manifest warning. Not sure if that is the cause.</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>Here is the manifest file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
   &lt;assembly xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" manifestVersion="1.0"&gt;
     &lt;compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"&gt;
       &lt;application&gt;
         &lt;!-- Windows 7 --&gt;
         &lt;supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" /&gt;
       &lt;/application&gt;
     &lt;/compatibility&gt;
     &lt;asmv3:application&gt;
       &lt;asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings"&gt;
         &lt;dpiAware&gt;true&lt;/dpiAware&gt;
       &lt;/asmv3:windowsSettings&gt;
     &lt;/asmv3:application&gt;
   &lt;/assembly&gt;
  </code></pre>
  
  <p>Here is the part in Makefile</p>
  
  <pre><code>    ADD_CUSTOM_COMMAND(
          TARGET myExe
          POST_BUILD
          COMMAND "mt.exe" -manifest \"${CMAKE_SOURCE_DIR}\\res\\dpiaware.manifest\" -inputresource:\"$&lt;TARGET_FILE:myExe&gt;\"\;\#1 -outputresource:\"$&lt;TARGET_FILE:myExe&gt;\"\;\#1
          COMMENT "Adding display aware manifest..."
      )
  </code></pre>