Skip to content

Instantly share code, notes, and snippets.

@e-t-l
Created November 10, 2023 20:54
Show Gist options
  • Save e-t-l/5ec43b5a94890cd832c239f8f1e5e93f to your computer and use it in GitHub Desktop.
Save e-t-l/5ec43b5a94890cd832c239f8f1e5e93f to your computer and use it in GitHub Desktop.
Override per-program DPI (fix blurry apps on high-res displays)
Windows Registry Editor Version 5.00
;; Adds an option to the context menu of .EXE files to change the app's resolution, helpful if Windows Settings has Scaling set to anything other than 100%
;; Performs the same function as the Compatibility options in the file Properties. Helpful for executables that don't have a Compatibility tab, such as MMC.exe
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\exefile\shell\OverrideDPI]
"MUIVerb"="Override DPI"
"Icon"="regedit.exe"
"Position"="Bottom"
"Subcommands"=hex(2):00,00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\exefile\shell\OverrideDPI\shell]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\exefile\shell\OverrideDPI\shell\Application]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\exefile\shell\OverrideDPI\shell\Application\command]
@="\"%SystemRoot%\\System32\\reg.exe\" add \"HKCU\\SOFTWARE\\MICROSOFT\\WINDOWS NT\\CURRENTVERSION\\AppCompatFlags\\Layers\" /t REG_SZ /d ~HIGHDPIAWARE /f /v"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\exefile\shell\OverrideDPI\shell\System]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\exefile\shell\OverrideDPI\shell\System\command]
@="\"%SystemRoot%\\System32\\reg.exe\" add \"HKCU\\SOFTWARE\\MICROSOFT\\WINDOWS NT\\CURRENTVERSION\\AppCompatFlags\\Layers\" /t REG_SZ /d ~DPIAWARE /f /v"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\exefile\shell\OverrideDPI\shell\System (enhanced)]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\exefile\shell\OverrideDPI\shell\System (enhanced)\command]
@="\"%SystemRoot%\\System32\\reg.exe\" add \"HKCU\\SOFTWARE\\MICROSOFT\\WINDOWS NT\\CURRENTVERSION\\AppCompatFlags\\Layers\" /t REG_SZ /d ~GDIDPISCALING DPIUNAWARE /f /v"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\exefile\shell\OverrideDPI\shell\zNone]
"MUIverb"="None"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\exefile\shell\OverrideDPI\shell\zNone\command]
@="\"%SystemRoot%\\System32\\reg.exe\" del \"HKCU\\SOFTWARE\\MICROSOFT\\WINDOWS NT\\CURRENTVERSION\\AppCompatFlags\\Layers\" /f /v"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment