Advertisement
Nabutso

high dpi scaling for legacy programs

Nov 18th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.45 KB | None | 0 0
  1. if you use scaling on windows that is NOT 200% (this isnt for people using 100% scaling), you will get a blurry mess. this is because these programs are not designed for scaling that isnt 100%, and will simply expand like you would an image in paint at any other scaling. anything except 200% will have some level of blurring involved. with that said, you might need a 4k monitor to make use of this, because it's likely that you won't use 200% scaling unless using a 4k monitor. you can still use this with other % scaling but keep that in mind. you either have a smaller program with crisp pixels or a larger one with blur, unless you use 200%.
  2.  
  3. first, we will add a regedit key that will enable the use of external .exe manifests
  4. 1. launch regedit as an admin
  5. 2. navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide
  6. 3. with the SideBySide folder selected, right click the area with the values; new-> DWORD
  7. 4. the new DWORD will be named PreferExternalManifest
  8. 5. give it a value data of 1 (should look like this: https://i.gyazo.com/f374d92e675740b8d9aae0a155e2c006.png )
  9. 6. exit regedit
  10.  
  11. second, we make the manifest files for the program(s) you need to scale
  12. 1. navigate to the folder that the .exe you want to scale is located
  13. 2. make a new text file named <yourexe>.exe.manifest (example: java.exe.manifest, should look something like this: https://i.gyazo.com/0c82f24921c6dc8b24492423e0544cc3.png ) NEVER TAKE OWNERSHIP OF FOLDERS OR FILES. move the files into the folder if it prevents you from making the file there.
  14. 3. paste the following into the text file (notice that the only thing happening here really is telling windows that the exe isn't dpi aware, letting windows scale it rather than the application scaling itself):
  15.  
  16. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  17.  
  18. <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
  19.  
  20. <dependency>
  21. <dependentAssembly>
  22. <assemblyIdentity
  23. type="win32"
  24. name="Microsoft.Windows.Common-Controls"
  25. version="6.0.0.0" processorArchitecture="*"
  26. publicKeyToken="6595b64144ccf1df"
  27. language="*">
  28. </assemblyIdentity>
  29. </dependentAssembly>
  30. </dependency>
  31.  
  32. <dependency>
  33. <dependentAssembly>
  34. <assemblyIdentity
  35. type="win32"
  36. name="Microsoft.VC90.CRT"
  37. version="9.0.21022.8"
  38. processorArchitecture="amd64"
  39. publicKeyToken="1fc8b3b9a1e18e3b">
  40. </assemblyIdentity>
  41. </dependentAssembly>
  42. </dependency>
  43.  
  44. <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
  45. <security>
  46. <requestedPrivileges>
  47. <requestedExecutionLevel
  48. level="asInvoker"
  49. uiAccess="false"/>
  50. </requestedPrivileges>
  51. </security>
  52. </trustInfo>
  53.  
  54. <asmv3:application>
  55. <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
  56. <ms_windowsSettings:dpiAware xmlns:ms_windowsSettings="http://schemas.microsoft.com/SMI/2005/WindowsSettings">false</ms_windowsSettings:dpiAware>
  57. </asmv3:windowsSettings>
  58. </asmv3:application>
  59.  
  60. </assembly>
  61.  
  62. 4. for things like java, you need to make sure you're using the right java files. for example, vscape requires javaw.exe, not just java.exe. so do this for javaw.exe.manifest as well
  63. 5. save the file. some directories, like java's typically won't let you make files there or save files there. if that happens, make the files elsewhere, then move them into the folder. or just make the folder non read-only
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement