Skip to content

Commit

Permalink
Ability to set Control Center as network icon action (merged valinet#492
Browse files Browse the repository at this point in the history
)
  • Loading branch information
valinet committed Dec 4, 2021
1 parent af20433 commit aafd184
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
14 changes: 13 additions & 1 deletion ExplorerPatcher/dllmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -2667,7 +2679,7 @@ HRESULT pnidui_CoCreateInstanceHook(
{
if (dwVal)
{
if (dwVal == 5)
if (dwVal == 5 || dwVal == 6)
{
if (hCheckForegroundThread)
{
Expand Down
3 changes: 2 additions & 1 deletion ExplorerPatcher/settings.reg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit aafd184

Please sign in to comment.