2

I have a large app that we are delaying supporting dynamic DPI for. Currently, when we launch our app via RemoteApp (RDP to our Windows Server 2016 server) on a high DPI screen, the text and controls overlap.

As a work around for our customers with high DPI displays, we found the best solution is to set HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\IgnoreClientDesktopScaleFactor to 1. This stops the RemoteApp from using DPI scaling and makes it look decent.

The problem is that the size of the window itself starts off super tiny. Example 1

If you change the scaling factor on the local PC and then change it back, it will automatically size the window back up to the correct scaling. Example 2 Example 3

We would prefer to use this workaround instead of adding a mstsc manifest file to our customers' PC's, but we would need to know how to force the scaling to start off with the local PC's settings while still avoiding DPI scaling.

  • Alternatively you may try in the .exe Properties the possible high DPI settings. Maybe some setting would behave better. But the basic problem is that mstc is not DPI-aware. – harrymc Jul 9 at 20:28
  • @harrymc we are using the .exe properties as a backup solution, but we will have to distribute our batch file that adds the .exe.manifest and registry setting to the computer to each customer that needs it. I don't understand why mstsc supports running high DPI apps, but when it's set to ignore scaling, Windows only scales the window for it when there's a change in scale. :-( – SkylerJ Jul 9 at 20:38
  • Using an RDP manager rather than raw RDP usually corrects such problems. I have used the old Royal TS, where version 1.5 is still freeware. The downside is that it must be installed on the client. – harrymc Jul 9 at 20:56
  • @harrymc I agree that using mstsc is outdated and likely the cause of this, but I don't have the authority to change applications. Our company and customers are also using RemoteApp protocol, which not many RDP managers support. – SkylerJ Jul 9 at 21:20
0

When doing RDP from a high-DPI client monitor into a low-DPI server, the problem is that the RDP window doesn’t scale up, representing the screen pixel by pixel, so making everything tiny and unreadable.

In the article Remote Desktop client on HiDPI (Retina) displays: Work around pixel scaling issues, the author, Chris K., presents the solution of disabling HiDPI scaling for mstsc2.exe using AppCompatFlags. As this is impossible to do for a system executable, he proposes the simple solution of creating a copy of mstsc.exe (called mstsc2.exe).

In an elevated (admin) cmd shell, create a copy of mstsc.exe and mstsc.exe.mui, where the en-us part corresponds to the installed language:

cd %systemroot%\system32
copy mstsc.exe mstsc2.exe
cd %systemroot%\system32\en-us\
copy mstsc.exe.mui mstsc2.exe.mui

Then to set the AppCompatFlag for all users for mstsc2.exe:

reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /t REG_SZ /v "C:\Windows\System32\mstsc2.exe" /d "~ DPIUNAWARE" /f

Now one should be able to start mstsc2.exe and connect to the remote host with no scaling issues.

  • We found a way to add a manifest to the system executable by adding a registry value to "Prefer external manifest" and then add "dpiAware" to the manifest, set to false. While this still requires admin, it doesn't make the user use another exe. – SkylerJ Oct 1 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.