Windows 8 and 8.1 Forums

Global DPI Scaling Disable for Win8.1 for all files/users

  1. #11

    Posts : 47
    Windows 8.1 Pro/Server 2012 R2 Datacenter

    So many methods to hook presumably easier than attempts to use something removed...

    Easiest seems to be this one to spoof the manifest is Window.SetProcessDPIAware
    Details of the effects on the manifest, titled Manifest Madness over at MSDN

    There are also these, but also not exposed in the registry:


    A few others (perhaps equivalent to the above) I dug up through stack traces:

    :84a70 HighDpi
    :84da0 DPI
    :1d0398 ScaleFactor (I remember this one exposed to the API as ScaleF, but no registry)

    Perhaps even possible via the registry in one place (per monitor), but too risky without a VM going for now: CurrentControlSet\Control\Video\{ID}\Defaultsettings.*

    But trying to keep it clean since I don't want another persistent hook than anyone else. Just combing through the stack traces makes me icky at the wasted cycles of back and forth with Windows, and I've only got 2 of those going.

    Another place I see the Compatibility Troubleshooter poking at, a possible potential: HKLM\SOFTWARE\Microsoft\Ole\AppCompat

    DesktopDPIOverride is still the one I havne't touched, and probably should the more I read. If the docs are believed it's only good for incements of 25%:
    DPI-related APIs and registry settings

    Very good article right there I wish I had long ago. As is this one explaining the calculations and optimal picks besides the obvious 200%:
    Writing DPI-Aware Desktop and Win32 Applications (Windows)

    Speaking of good articles, that first one has a paragraph expressing the sentiments around this whole thing accurately:

    If you do have one or more poorly-written application without any DPI awareness, you must enable DPI virtualization unless you’re willing to tolerate the application’s screwed-up GUI. Unfortunately, this results in a secondary problem because Microsoft designed this option the wrong way around. DPI virtualization is opt-out rather than opt-in: you can only enable it for the entire system, then you must selectively disable it for individual applications.
    But for now, I believe the issue with svchost is resolved. The default DPI that the System user shares. It was still at 96, right there in WindowMetrics where I started months ago.

    So barring any surprises, going to start cleaning this up and ask shortly for a closed thread or delete myself if I can. Then wrap it all up into a few lines of .reg and now hopefully it's for good.

      My System SpecsSystem Spec

  2. #12

    Posts : 47
    Windows 8.1 Pro/Server 2012 R2 Datacenter

    Finding it difficult to replicate. For example, does anyone know how to make symlinks in the registry?

    Click image for larger version

    smss does, but I sure don't (neither does regedit). Hardcoding is fine but not ideal.

    Also working on another approach based on a technique I saw the troubleshooter using. External manifest with dpiAware=true/pm and setting a key to specify the preference for external over internal.

    That would depend on the compatibility engine parsing the XML in a way that isn't currently implemented but should be possible given the ECMA standard. I'll need a .manifest at the key parts of the .NET common language runtimes and if necessary (like for mmc.exe) maybe even a .config for standalone assemblies.

    At least that's getting me out of the black box registry tricks getting pulled here. If it works the end result would be a polite code injection without the background process
      My System SpecsSystem Spec

  3. #13

    Posts : 47
    Windows 8.1 Pro/Server 2012 R2 Datacenter

    Forgot to mention, there is already a fully working method in place. I'll put it on the first page. It's just a bunch of registry settings for environment variables. Unlike the regular Layers key entries, these get passed down into child processes. There are many ways of doing this that only Microsoft knows, certainly that environment variable is nowhere to be found... until now. :-)
      My System SpecsSystem Spec

  4. #14

    Posts : 47
    Windows 8.1 Pro/Server 2012 R2 Datacenter

    Bypassed the restriction on running the PCW on system files and saw this

    Click image for larger version

    Here is procmon showing the PCW writing the same xsd:string=dpiAware except it's to the common runtime itself . Thta's as a last resort and seems to be the strongest override, as I don't see a sequence preference for an external manifest taking over the invocation policy protections around a file like that.

    The scope obviously needs expansion beyond that file but since it's a common runtime that sounds very broad in name (SxS Settings\Windows Settings) that just might cover the entire 3.0 namespace (
      My System SpecsSystem Spec

  5. #15

    Posts : 47
    Windows 8.1 Pro/Server 2012 R2 Datacenter

    EDIT 5/12: Getting messages about this thread, no one posts though. Remember this is all in testing. With that said, AppliedDPI cannot be set at the registry level, it's inherited at bootup/logon from LogicalDPI. Better implementation guide soon
    Works exactly as expected. Before and after with nothing in the AppCompat\Layer keys...

    Click image for larger versionClick image for larger versionClick image for larger version

    Resource Hacker is not related to MMC... a little different I guess. It's widely known to crash when embedding a manifest into it, so difficult to get sharp at times.

    Fortunately this appears to be easier than the SMI method, basically just declaring the desktop at 72 dpi and establishing that as the main multiplier (.75), then saying to Explorer that somehow the window is showing at 125% and we need it back at 100% (via AppliedDPI=120), it comes delivered to the desktop with 120ppi detail but 96ppi Explorer mode.

    I guess DesktopDPIOverride being responsible was the thinking here, but they are not read in that order IIRC. It's a factor that changes meaning, what the criteria is I'm still testing but this MSDN article mentions a "1" can mean an increase from 100% to 200%, not just 25%. Any in between need to be tested to see how effective lowering LogMetrics would be to DPIOverride, or if it will just scale down to a blurry smaller . would need to bet set as I haven't tried. You may get a slightly bigger or smaller app than 96 ppi but the idea is it should never virtualize into a glob of ugly.

    If you want to change up the Start screen you can also use LogicalDPIOverride at negatives whole numbers to zoom out for more squares or positives to zoom in, both 25% increments as well. There's another, undocumented property exposed by the GUI for "Larger Buttons" (something similar.) It creates the FontDPI/LogPixels/Logpixels dword at x78 (120 ppi in dec) when checked on in Start Screen, but I'm sure you can use any value to tweak zoom to whatever intermediate size you want and Metro will compensate.

    Some examples of the working theory consumer preview:

    Target PPI LogPixel
    dword (dec)
    dword (dec)
    100% - 96 ppi 0x60 (96) (not set) treated
    as == 0x60 (96)
    (not set) == "0" (not set) == "0"
    125% - 120 0x78 (120) 0x78 (120) "1" "1"
    150%i - 144 0x90 (144) 0x90 (144) "1" "1"
    175% "1" ? "1"
    200% "1" "1"
    133% "1" ? "1"

    • FontDPI/LogPixels is not a real folder, it's a symlink and editing the dword inside it with the same name does nothing. It looks like it sticks until you restart, but no amount of permissions can make it stick. I'm not aware of Backup Operator or equivalent permissions available for the registry to allow visibility into its symlinks. Still out on this one, but I say delete the key since it's the symlink. If it hasn't recreated at the correct DPI level by restart go back into the Display control panel and it should be
    • Also DesktopDPIOverride only works with Win8Scaling=1. You may be able to keep Win8 off and scale per monitor with AppliedDPI. Not sure about not matching DPI, if higher will definitely blur, lower bound needs checking.
    • Highly recommend double checking any changes against this MSDN article on DPI Registry settings, the most informative on the topic. Includes full reg paths, no mention of the symlinks however :-)

    PPI aware apps behave as they normally always have. In the first screenshot regedit is dpiAware and procmon is not, yet both are scaled to the same amount. Essentially, applying this method is like a mandatory opt-out policy for non-PPI aware apps.

    Will need to roll back the SMI config or just do this approach by itself on the laptop to rule out others, as both SMI and the environment variable approaches are capable of doing the same on their own based on where they were from that point. There is a key named "altitude" in the xml config, and it's used to access the more sensitive permissions, like launching early in boot before malware protection.

    Given the relative ease and the uncertainty of the xml being read, parsed correctly, etc. I think this is a good approach. It's better than the env vars which sometimes go missing depending on the context the process was invoked in. Hesitant to put them all in for backup since they can hide other issues (the window will appear smaller instead of blurring if the vars above are set incorrectly but if the environment var is set, hiding a conflict that normally doesn't exist by itself)
    Last edited by aph; 12 May 2014 at 14:13.
      My System SpecsSystem Spec

  6. #16

    Posts : 47
    Windows 8.1 Pro/Server 2012 R2 Datacenter

    Update 5/18: [snip] moved to OP
    Attached Thumbnails Attached Thumbnails HKLM_Scaling.png   HKLM_Flags.png  
    Last edited by aph; 18 May 2014 at 04:58.
      My System SpecsSystem Spec

  7. #17

    Posts : 47
    Windows 8.1 Pro/Server 2012 R2 Datacenter

    If it scales but blurry, this key overrides the override of the variable the other key set:

    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
    "C:\\Windows\\explorer.exe"="~ HIGHDPIAWARE"
    "C:\\Windows\\System32\\explorer.exe"="~ HIGHDPIAWARE"
    "C:\\Windows\\System32\\runonce.exe"="~ HIGHDPIAWARE"
    "C:\\Windows\\System32\\mmc.exe"="~ HIGHDPIAWARE"
    "C:\\Windows\\System32\\cmd.exe"="~ HIGHDPIAWARE"
    "C:\\Windows\\System32\\conhost.exe"="~ HIGHDPIAWARE"
    "C:\\Windows\\System32\\svchost.exe"="~ HIGHDPIAWARE"
    That key is always parsed so it sticks as a HKLM reg key, and since also results in an env var being set, gets passed down to child processes in case they don't do their own parsing.

    If needed it can also be added to HKCU (same subkey) and HKU\S-5-1-18 if you want HKCU's equivalent for the system user (if you use psexec or nircmd)
    Last edited by aph; 18 May 2014 at 05:01.
      My System SpecsSystem Spec

  8. #18

    Posts : 68
    Windows 8

    Thanks alot for this! One question thou;

    The line "[HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\[ABC...]\00\0#]

    If I set Hexadecimal 16, it results in (22)
    And decimal 10 results in (16)

    Which is correct?

    Also, I have like 10 different entries under GraphicsDriver/Configuration. How to know which ones are active?
      My System SpecsSystem Spec

  9. #19

    Posts : 68
    Windows 8

    Also, I have lots of different entries under graphicsdrivers/configuration. How to tell which ones are used and which ones are old?
      My System SpecsSystem Spec

  10. #20

    Posts : 68
    Windows 8

    If all else fails, how do I restore default global scaling?
      My System SpecsSystem Spec

Page 2 of 4 FirstFirst 1234 LastLast
Global DPI Scaling Disable for Win8.1 for all files/users
Related Threads
Hi everyone, I have Windows 8 Pro (64-bit). It's currently setup to run as a media server for my home, but I'm getting really annoyed as I keep accidently shutting it down or restarting. The only thing I want it to be able to do is to goto sleep. I don't want to disable buttons just for...
Hello, an annoying issue here. One of the programs I am attempting to have working correctly works fine when "Disable display scaling on high DPI settings" is checked off. However, upon exiting the program, it is rechecked by windows automatically. I am running Windows 8.1 on this machine...
I have a HTPC set to DPI 125%. Some of my programs look weird due to the scaling. When I try to use the setting in properties to disable scaling for a program, it does not work. Any suggestions as to why?
We just setup a new computer lab all running 8.1. I have slowly been going through the Group Policies and locking down user accounts so they cannot personalize it, keeping them all uniform. I am having trouble finding the policy or setting to disallow them from changing the layout of the Metro UI....
Hello, I'm trying to figure out how to disable the edge gestures, touchpad only, for all users on Windows 8.1. Here's the scenario: The laptops are touchscreen You use the touchpad to move the cursor around and the Edge gesture is triggered (charms, recent apps etc) There are hundreds...
How to Enable or Disable Biometrics Sign-in for Users in Windows 8.1 Starting in Windows 8.1 and Windows RT 8.1, a fingerprint registration application in PC settings is now included, thereby removing the need for a hardware manufacturer to provide such an application. Local users...
Hi, is it possible to disable the 'Show Administrative Tools' option for normal Users and make sure that they have no access? Thanks.
Eight Forums Android App Eight Forums IOS App Follow us on Facebook