Skip to content

Commit 72c6983

Browse files
authored
GUI: Hide the win8 network flyout as an option on Win 11 after 25346 as van.dll was removed (#4478)
* Hide the win8 network flyout as an option on Win 11 after 25346 as van.dll was removed * Also hide the control center as it doesnt work either * Don't hide the control center option - it should be fixed properly --------- Co-authored-by: Matthew Wigley <>
1 parent 1bbe207 commit 72c6983

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

ExplorerPatcher/osutility.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ inline BOOL IsWindows11BuildHigherThan25158()
7878
return global_rovi.dwBuildNumber > 25158;
7979
}
8080

81+
inline BOOL IsWindows11Build25346OrHigher()
82+
{
83+
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
84+
return global_rovi.dwBuildNumber >= 25346;
85+
}
86+
8187
inline BOOL IsWindows11Version22H2Build1413OrHigher()
8288
{
8389
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);

ep_gui/GUI.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2571,6 +2571,23 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
25712571
RemoveMenu(hMenu, 3, MF_BYCOMMAND);
25722572
}
25732573
}
2574+
else if (!wcscmp(name, L"ReplaceVan"))
2575+
{
2576+
if (IsWindows11Build25346OrHigher())
2577+
{
2578+
// Hide the win8 network flyout as an option on Win 11 after 25346 as van.dll was removed
2579+
MENUITEMINFOA menuInfo;
2580+
ZeroMemory(&menuInfo, sizeof(MENUITEMINFOA));
2581+
menuInfo.cbSize = sizeof(MENUITEMINFOA);
2582+
menuInfo.fMask = MIIM_DATA;
2583+
GetMenuItemInfoA(hMenu, 3, FALSE, &menuInfo);
2584+
if (menuInfo.dwItemData)
2585+
{
2586+
free(menuInfo.dwItemData);
2587+
}
2588+
RemoveMenu(hMenu, 3, MF_BYCOMMAND);
2589+
}
2590+
}
25742591
HKEY hKey = NULL;
25752592
wchar_t* matchHKLM = wcsstr(section, L"HKEY_LOCAL_MACHINE");
25762593
BOOL bIsHKLM = matchHKLM && (matchHKLM - section) < 3;

0 commit comments

Comments
 (0)