From aafd18496261d813f2ca00bc2f179e169da28f16 Mon Sep 17 00:00:00 2001 From: Valentin Radu Date: Sun, 5 Dec 2021 01:33:40 +0200 Subject: [PATCH] Ability to set Control Center as network icon action (merged #492) --- ExplorerPatcher/dllmain.c | 14 +++++++++++++- ExplorerPatcher/settings.reg | 3 ++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ExplorerPatcher/dllmain.c b/ExplorerPatcher/dllmain.c index b4a9962..85d3c75 100644 --- a/ExplorerPatcher/dllmain.c +++ b/ExplorerPatcher/dllmain.c @@ -577,6 +577,18 @@ void LaunchNetworkTargets(DWORD dwTarget) SW_SHOWNORMAL ); } + else if (dwTarget == 6) + { + InvokeActionCenter(); + // ShellExecuteW( + // NULL, + // L"open", + // L"ms-actioncenter:controlcenter/&showFooter=true", + // NULL, + // NULL, + // SW_SHOWNORMAL + // ); + } else if (dwTarget == 1) { ShellExecuteW( @@ -2667,7 +2679,7 @@ HRESULT pnidui_CoCreateInstanceHook( { if (dwVal) { - if (dwVal == 5) + if (dwVal == 5 || dwVal == 6) { if (hCheckForegroundThread) { diff --git a/ExplorerPatcher/settings.reg b/ExplorerPatcher/settings.reg index c49c9c2..2b23c27 100644 --- a/ExplorerPatcher/settings.reg +++ b/ExplorerPatcher/settings.reg @@ -87,7 +87,8 @@ "ReplaceNetwork"=dword:00000000 ;t When clicking a system icon in the tray, open: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Control Panel\Settings\Network] -;c 6 Network +;c 7 Network +;x 6 Control Center ;x 5 Windows 11 WiFi flyout ;x 0 Windows 10 flyout (default) ;x 2 Windows 8 flyout