Windows PE: Disable DPI autoscaling

Hi,

if you start an application on Windows PE which is not “compatible” with the Windows Display autoscaling feature the applications forms is shown “deformed”. Fonts does not scale down and are shown bigger then the controls itself.

You can prevent Windows from doing this 🙂

Set the following registry keys in Windows PE registry. This must be done at the Windows PE creation time.

Let us assume your Windows PE root is mounted at C:\mnt.

Load the Windows PE default User registry hive into your local registry unter the HKEY_LOCAL_MACHINE subkey temp. The WinPE HKEY_CURRENT_USER registry hive is then exposed under HKLM\temp and can be edit.

C:\> reg load HKLM\temp C:\mnt\windows\system32\config\DEFAULT

Insert the following values. Replace the Path “X:\Pro…..” with the absolute Path of your Application when Win PE is started.

reg add "HKLM\temp\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /t REG_SZ /v "X:\Program Files\yourApplication\yourApplication.exe" /d "HIGHDPIAWARE" /f
reg add "HKLM\temp\Control Panel\Desktop" /t REG_DWORD /v LogPixels /d 96 /f
reg add "HKLM\temp\Control Panel\Desktop" /v Win8DpiScaling /t REG_DWORD /d 0x00000001 /f
reg add "HKLM\temp\Control Panel\Desktop" /v DpiScalingVer /t REG_DWORD /d 0x00001018 /f

Unload the hive

C:\> reg unload HKLM\temp

and start building of the Windows PE.

Michael

Leave a Reply