Shortcut Compatability Tab

Started by seckner, August 18, 2016, 11:22:20 AM

Previous topic - Next topic

seckner

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?

td

If BGInfo.exe does not have an internal manifest you could always create an external .manifest file:

Code (html5) Select
<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.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

td

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.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade