As a part of a setup were trying to script we copy SysInternals BGInfo into a directory. Then, because BGInfo has problems with high DPI settings we then have to:
Right click on BGInfo.exe, go to the Compatibility tab
Press the "Change settings for all users" button
Check the "Disable display scaling on high DPI settings"
Press OK
Press OK
I was hoping that ShortcutExtra() might have something but it doesn't. Does anyone have a suggestion on how I might be able to script this part?
If BGInfo.exe does not have an internal manifest you could always create an external .manifest file:
<asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>true</dpiAware>
</asmv3:windowsSettings >
</asmv3:application>
If it does have a manifest, you would have to fiddle with the registry a bit to get it to work.
Or you could always try to figure out if and where the the dpi setting is located in the shortcut .lnk file. If you can figure that out you could then brute force edit the .lnk file so it includes the correct info.
If the setting is not in the .lnk, it is likely in the registry. You would have to poke around in the compatibility settings to find it.
Remembered the setting is in the registry, i.e., 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers'. Put the full path to the app as a string value name under the key and use exactly ~ HIGHDPIAWARE as the value's value.