From a9dd578b3170105942847ce81f9187e9da194236 Mon Sep 17 00:00:00 2001 From: Valentin Radu Date: Sat, 16 Oct 2021 02:44:28 +0300 Subject: [PATCH] Added option to launch Network Connections from tray --- ExplorerPatcher/dllmain.c | 31 +++++++++++++++++++++++-------- ExplorerPatcher/settings.reg | 16 ++++++++++++---- 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/ExplorerPatcher/dllmain.c b/ExplorerPatcher/dllmain.c index 36ca56f..6c7a574 100644 --- a/ExplorerPatcher/dllmain.c +++ b/ExplorerPatcher/dllmain.c @@ -963,14 +963,29 @@ BOOL pnidui_TrackPopupMenuHook( ); if (bReplaceNetwork && b == 3109) { - ShellExecuteW( - NULL, - L"open", - L"shell:::{8E908FC9-BECC-40f6-915B-F4CA0E70D03D}", - NULL, - NULL, - SW_SHOWNORMAL - ); + // very helpful: https://www.tenforums.com/tutorials/3123-clsid-key-guid-shortcuts-list-windows-10-a.html + if (bReplaceNetwork == 1) + { + ShellExecuteW( + NULL, + L"open", + L"shell:::{8E908FC9-BECC-40f6-915B-F4CA0E70D03D}", + NULL, + NULL, + SW_SHOWNORMAL + ); + } + else if (bReplaceNetwork == 2) + { + ShellExecuteW( + NULL, + L"open", + L"shell:::{7007ACC7-3202-11D1-AAD2-00805FC1270E}", + NULL, + NULL, + SW_SHOWNORMAL + ); + } b = 0; } pnidui_TrackPopupMenuElapsed = milliseconds_now(); diff --git a/ExplorerPatcher/settings.reg b/ExplorerPatcher/settings.reg index 7ad7241..5ff9e64 100644 --- a/ExplorerPatcher/settings.reg +++ b/ExplorerPatcher/settings.reg @@ -24,11 +24,21 @@ ;x 1 Small ;x 0 Large (default) "TaskbarSmallIcons"=dword:00000000 -;b Show Task view button -"ShowTaskViewButton"=dword:00000000 +[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ExplorerPatcher] +;a Choosing 'Open Network && Internet settings' when right clicking the system tray +;c 3 network icon should open: +;x 0 Network section in the Settings app (default) +;x 1 Network and Sharing Center in Control Panel +;x 2 Network Connections in Control Panel +"ReplaceNetwork"=dword:00000000 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search] ;b Show Search button "SearchboxTaskbarMode"=dword:00000000 +[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] +;b Show Task view button +"ShowTaskViewButton"=dword:00000000 +;b Show seconds in the system tray clock +"ShowSecondsInSystemClock"=dword:00000000 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ExplorerPatcher] ;b Skin taskbar and tray pop-up menus "SkinMenus"=dword:00000001 @@ -36,8 +46,6 @@ "CenterMenus"=dword:00000001 ;b Flyout behavior for tray icon pop-up menus "FlyoutMenus"=dword:00000001 -;b Open Network and Sharing Center from pop-up menu of network tray icon -"ReplaceNetwork"=dword:00000000 ;b Hide Control Center button * "HideControlCenterButton"=dword:00000000 ;p 2