Got myself a new mobile workstation (Lenovo P50), and was looking forward to be able to run my Hyper-V lab on this powerful beast. With a Xeon processor, 64GB ram and m12 Solid State drives I thought testing deployments would become a breeze… But what I found was that this new computer, which has a 4K display would give me quite a few headaches!
Problem is that when using Hyper-V Virtual Machine Connection to connect to the guests, it relies on the Guest OS to handle the display scaling within the OS itself. This results in very small windows for operating systems that does not handle DPI scaling like some Linux distributions and to my great annoyance Windows PE!.
So when connecting to my guests the windows looked like this:
As you might suspect these small windows would cause you to squint quite a lot to see what is going on, an reading logfiles are near impossible…
After drawing blank at my fellow deployment gurus I started trawling the internet for a solution, several days later after reading a lot of developer documentation on display scaling I finally found a solution!
Add the following registry key to tell Windows to prefer external manifest files:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\PreferExternalManifest=1 (DWORD value)
Place a manifest file beside the executable that you want Windows to scale properly and that’s it!
Now your Hyper-V Virtual Machine Connection scales better, and squinting is a thing of the past.
Add the registry key mentioned above and locate the executable that causing you problems, in this case it is the vmconnect.exe located in the Windows\System32 directory.
Download the program.manifest file attached below and rename it to vmconnect.exe.manifest and place it next to the executable like this:
the manifest file is just an xml file that looks like this:
Start your program and that’s it, no reboot needed.
After this success, I thought about other uses for this fix, one of the obvious ones were RDP connection to computers that do not handle the scaling, such as Windows Server 2008.
Before adding manifest file to mstsc.exe:
After adding a manifest file:
So this also works for getting a more usable RDP connection on 4K or 3K monitors.
What I have done is copied the mstsc.exe to mstsc2.exe and copied the mstsc.exe.mui language file in the en-us language folder (make change in the appropriate language folder). I then added a mstsc2.exe.manifest file allowing me to choose whether or not to correct the display scaling depending on the OS I’m connecting to.
You can download the program.manifest file here: ManifestFile.zip 668 bytes
Downloaded 446 times