From baecdcc191606d61b794c86223fcb4a06de839a3 Mon Sep 17 00:00:00 2001 From: Valentin Radu Date: Fri, 5 Aug 2022 21:31:13 +0300 Subject: [PATCH] GUI: Enable search button in Windows 10 taskbar by default on OS builds 22621+ --- ExplorerPatcher/dllmain.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ExplorerPatcher/dllmain.c b/ExplorerPatcher/dllmain.c index c43e4a5..e8f4abe 100644 --- a/ExplorerPatcher/dllmain.c +++ b/ExplorerPatcher/dllmain.c @@ -10325,6 +10325,16 @@ DWORD Inject(BOOL bIsExplorer) RegDeleteKeyValueW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", L"MMTaskbarGlomLevel"); } + if (IsWindows11Version22H2OrHigher() && bOldTaskbar) + { + DWORD dwRes = 1; + DWORD dwSize = sizeof(DWORD); + if (RegGetValueW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Search", L"SearchboxTaskbarMode", RRF_RT_DWORD, NULL, &dwRes, &dwSize) != ERROR_SUCCESS) + { + RegSetKeyValueW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Search", L"SearchboxTaskbarMode", REG_DWORD, &dwRes, sizeof(DWORD)); + } + } + /* if (IsWindows11())