From f72eecde0e6a0d172da0aef801e43666f013e9e1 Mon Sep 17 00:00:00 2001 From: Matthew Wigley <> Date: Sun, 27 Jul 2025 10:49:50 +1200 Subject: [PATCH] Hide the win8 network flyout as an option on Win 11 after 25346 as van.dll was removed --- ExplorerPatcher/osutility.h | 6 ++++++ ep_gui/GUI.c | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/ExplorerPatcher/osutility.h b/ExplorerPatcher/osutility.h index 866638f..729988a 100644 --- a/ExplorerPatcher/osutility.h +++ b/ExplorerPatcher/osutility.h @@ -78,6 +78,12 @@ inline BOOL IsWindows11BuildHigherThan25158() return global_rovi.dwBuildNumber > 25158; } +inline BOOL IsWindows11Build25346OrHigher() +{ + if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi); + return global_rovi.dwBuildNumber >= 25346; +} + inline BOOL IsWindows11Version22H2Build1413OrHigher() { if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi); diff --git a/ep_gui/GUI.c b/ep_gui/GUI.c index 8decc48..0c08253 100644 --- a/ep_gui/GUI.c +++ b/ep_gui/GUI.c @@ -2571,6 +2571,23 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) RemoveMenu(hMenu, 3, MF_BYCOMMAND); } } + else if (!wcscmp(name, L"ReplaceVan")) + { + if (IsWindows11Build25346OrHigher()) + { + // Hide the win8 network flyout as an option on Win 11 after 25346 as van.dll was removed + MENUITEMINFOA menuInfo; + ZeroMemory(&menuInfo, sizeof(MENUITEMINFOA)); + menuInfo.cbSize = sizeof(MENUITEMINFOA); + menuInfo.fMask = MIIM_DATA; + GetMenuItemInfoA(hMenu, 3, FALSE, &menuInfo); + if (menuInfo.dwItemData) + { + free(menuInfo.dwItemData); + } + RemoveMenu(hMenu, 3, MF_BYCOMMAND); + } + } HKEY hKey = NULL; wchar_t* matchHKLM = wcsstr(section, L"HKEY_LOCAL_MACHINE"); BOOL bIsHKLM = matchHKLM && (matchHKLM - section) < 3;