Following the above approach, I want to add another section to
Desktop Context Menu to quickly switch Current Display. That provides quick access to desktop program shortcuts, Taskbar and System Tray from any monitor chosen as Current from Context Menu in a multi-monitor setup without opening
Control Panel - Display Settings. This section uses Windows
DisplaySwitch app. The following .reg file will add required keys to Registry:
Code: Select all
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Change Current Display]
@=hex(2):00,00
"Icon"="%systemroot%\\system32\\imageres.dll,109"
"Position"="Bottom"
"SubCommands"=""
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Change Current Display\Shell]
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Change Current Display\Shell\Display Settings]
@=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,\
00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,64,00,\
69,00,73,00,70,00,6c,00,61,00,79,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,34,\
00,00,00
"Icon"="%systemroot%\\system32\\imageres.dll,5374"
"Position"="Top"
"SettingsUri"="ms-settings:display"
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Change Current Display\Shell\Display Settings\Command]
"DelegateExecute"="{556FF0D6-A1EE-49E5-9FA4-90AE116AD744}"
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Change Current Display\Shell\Monitor 1]
"Icon"="%systemroot%\\system32\\imageres.dll,109"
"MUIVerb"="PC Monitor"
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Change Current Display\Shell\Monitor 1\Command]
@="DisplaySwitch.exe /internal"
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Change Current Display\Shell\Monitor 2]
"Icon"="%systemroot%\\system32\\imageres.dll,197"
"MUIVerb"="LCD TV"
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Change Current Display\Shell\Monitor 2\Command]
@="DisplaySwitch.exe /external"
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Change Current Display\Shell\Extend Monitor]
"Icon"="%systemroot%\\system32\\imageres.dll,147"
"MUIVerb"="Extend Monitors"
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Change Current Display\Shell\Extend Monitor\Command]
@="DisplaySwitch.exe /extend"
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Change Current Display\Shell\Clone Monitor]
"Icon"="%systemroot%\\system32\\imageres.dll,152"
"MUIVerb"="Clone Monitors"
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Change Current Display\Shell\Clone Monitor\Command]
@="DisplaySwitch.exe /clone"
To remove Windows 10 default
Display Settings option in Context Menu, one can open Regedit as Admin, go to key HKEY_CLASSES_ROOT\DesktopBackground\Shell\Display Settings. Export it to backup, then take ownership of the key in its Permissions, and delete the key. I assume HKEY_CURRENT_USER section can be changed instead of HKEY_CLASSES_ROOT as was done earlier to avoid Admin privileges requirement.
Of course a similar Scheduled Task may be added to dynamically update Current Display icon in desktop context menu depending on what option is currently active: PC Monitor, LCD TV, Extend Monitors, Clone Monitors. However, its unclear what EventID would trigger the task ( or possibly something else should), and how to detect Current display? A different approach might be needed to trigger the task due to certain complexity of working with Windows API.
Also, what simple Jscript
UpdateDisplayIcon.js or VBS file would perform this scheduled task ONLY (no other functions) without opening Cmd window instead of a batch used in Change Power Plan task above?