LLI Wiki — My Digital Knowledge Base

Windows: fix mstsc DPI scaling and clean up mapped drives

Fix Remote Desktop Connection DPI scaling and clean up leftover mapped drives and credentials on Windows.

Fix DPI display issues (tiny text/icons) in Remote Desktop Connection (mstsc) on Windows 10/11, plus useful commands to clean up mapped drives and leftover cached credentials.

DPI scaling issue with mstsc

On a high-resolution (UHD) display, mstsc.exe is not itself DPI-aware and can show unreadable text or icons in a remote session.

Reference: High DPI issues with Remote Desktop in Windows 10

Fix: application manifest

This registry value forces applications to use an external manifest:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide

PreferExternalManifest  DWORD (32 bit)  1

Then create C:\Windows\System32\mstsc.exe.manifest with this content, which disables the application's own DPI awareness (the system then applies its own scaling):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*">
</assemblyIdentity>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.VC90.CRT"
version="9.0.21022.8"
processorArchitecture="amd64"
publicKeyToken="1fc8b3b9a1e18e3b">
</assemblyIdentity>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="asInvoker"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<ms_windowsSettings:dpiAware xmlns:ms_windowsSettings="http://schemas.microsoft.com/SMI/2005/WindowsSettings">false</ms_windowsSettings:dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>

This fix only applies to mstsc.exe; other third-party RDP clients (such as MobaXterm) do not necessarily expose the same setting and may require contacting the vendor.

Cleaning up mapped drives and leftover connections

List and remove cached credentials:

cmdkey /list
cmdkey /delete:<server_name_or_address>

Map and remove a network drive:

net use Z: \\<server>\<share>
net use H: /delete /y
net use I: /delete /y

Remove the registry keys associated with old mapped drives:

Remove-Item "HKCU:\Network\H" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item "HKCU:\Network\I" -Recurse -Force -ErrorAction SilentlyContinue

Remove leftover mount-point entries (for example for an Azure Files share):

Remove-Item "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\##mystorageaccount.file.core.windows.net#share1" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\##mystorageaccount.file.core.windows.net#share2" -Recurse -Force -ErrorAction SilentlyContinue

Restart Windows Explorer to apply the changes:

taskkill /f /im explorer.exe
start explorer.exe

Notes

Mastodon LLIMastodon SocialFosstodon