1

I am using Windows Media Player for playing music files, because there does not seem any decent free music player for Windows. VLC's interface sucks. Groove Music, which Microsoft is replacing WMP with, sucks, too; it does not even support file drag-and-drop.

The problem is that WMP does not work well with high-DPI. the slider is too thin to click and when the window is maximised, it flickers. For normal application EXE's, there is the "Compatibility" tab in the Properties so that I can override the high-DPI settings. But for some reason, that thing does not exist for WMP. Is there anyway to access the setting so that I can make WMP's window get doubled (The "System (Enhanced)" option in the drop-down menu)?

enter image description here

enter image description here

Damn Vegetables
  • 4,308
  • 19
  • 60
  • 98

2 Answers2

1

You can make a copy of wmplayer.exe into the same Windows Media Player directory. The copy will have a Compatibility tab but otherwise work the same. (You could also hack up the EXE manifest with a hex editor to change its DPI awareness declaration, but making a copy is much easier!)

Unfortunately, GDI (enhanced system) scaling causes a big mess for this application:

text ellipsized, buttons blacked out

But system scaling is fine, just blurry:

correct layout, blurry


If you need to modify the DPI awareness of the original executable though (e.g. because of file association issues), we have to break out the hex editor—I like XVI32. First, assign ownership of and full access to the wmplayer.exe file to the Administrators group. Make a back-up copy in case you make a mistake or want to revert the changes.

Run XVI32 as administrator and open wmplayer.exe. Press Ctrl+F to open the Find dialog. Search for the text string <dpiAwareness with the "as Unicode Latin" box unchecked. Click the opening angle bracket in the right pane to make sure that pane is active (white background). Tap the spacebar until you have overwritten the entire tag <dpiAwareness>PerMonitorV2</dpiAwareness> with spaces. (Do not press Delete or Backspace!) This removes the DPI awareness declaration and causes Windows to apply system scaling. Save the changes with Ctrl+S.

For completeness' sake: GDI scaling can be applied by adding a gdiScaling tag. (This would again produce ugly results for Windows Media Player, but might be useful for other programs.) Scroll up a tiny bit and overwrite the "2016" in the previous tag's xmlns attribute with "2017", then immediately after its closing angle bracket, overwrite the spaces with <gdiScaling>true</gdiScaling>. When you're done, it will look like this (new tag highlighted in red, attribute change selected in blue):

gdiScaling tag added, 6 changed to 7

Ben N
  • 42,308
0

With Windows Media Player 12, you can make it DPI aware by editing the registry AppCompatFlags:

  1. Press Windows + R type in regedit, enter and go to:

Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

  1. Right-click on the key called Layers and create a new string value.

  2. Name the string C:\Program Files (x86)\Windows Media Player\wmplayer.exe

  3. Right-click on the newly created string and select Modify.. and then insert the word HIGHDPIAWARE and select Ok.

  4. Restart Windows Media Player for the changes to take effect

This fix can also work for mmc.exe so that all Microsoft Management Console-enabled applications can be DPI-aware.