From d7885414f2eb13bb3eeead2c25173f12d34403d9 Mon Sep 17 00:00:00 2001 From: Valentin Radu Date: Fri, 10 Dec 2021 03:42:32 +0200 Subject: [PATCH] Attempt to mitigate #416 --- CHANGELOG.md | 1 + ExplorerPatcher/dllmain.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d796e1..3fd55ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ Tested on build 22000.348. * File Explorer is restarted unelevated when servicing the application (#528) (.7) * Reliability improvements for File Explorer restarts (#529) (.7) * When changing the main taskbar position and restarting File Explorer, the new position is now correctly saved and applied when File Explorer restarts (#523) (.7) +* Mitigation for the issue described in #416 (.7) #### Simple Window Switcher diff --git a/ExplorerPatcher/dllmain.c b/ExplorerPatcher/dllmain.c index 0e42acb..ac90304 100644 --- a/ExplorerPatcher/dllmain.c +++ b/ExplorerPatcher/dllmain.c @@ -6847,6 +6847,14 @@ HRESULT EntryPoint(DWORD dwMethod) ); CloseHandle(hProcess); + TCHAR wszSearchIndexerPath[MAX_PATH]; + GetSystemDirectoryW(wszSearchIndexerPath, MAX_PATH); + wcscat_s(wszSearchIndexerPath, MAX_PATH, L"\\SearchIndexer.exe"); + if (!_wcsicmp(exePath, wszSearchIndexerPath)) + { + return E_NOINTERFACE; + } + TCHAR wszExplorerExpectedPath[MAX_PATH]; GetWindowsDirectoryW(wszExplorerExpectedPath, MAX_PATH); wcscat_s(wszExplorerExpectedPath, MAX_PATH, L"\\explorer.exe");