Skip to content

Commit 991b8ca

Browse files
committed
feat: added an executable name blacklist to prevent shell extension from loading in those applications
1 parent a3eb912 commit 991b8ca

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

ExplorerPatcher/dllmain.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13099,6 +13099,24 @@ HRESULT EntryPoint(DWORD dwMethod)
1309913099
);
1310013100
CloseHandle(hProcess);
1310113101

13102+
// Application blacklist for loading shell extension (https://github.com/valinet/ExplorerPatcher/issues/4819)
13103+
static const WCHAR* const c_rgApplicationBlacklist[] =
13104+
{
13105+
L"mpc-hc",
13106+
L"mpc-be",
13107+
L"powertoys",
13108+
L"vlc.exe",
13109+
L"mpv.exe",
13110+
L"DisplayFusion.exe", // Crash when writing a VirtualProtect-ed region in PatchAddressBarSizing()
13111+
};
13112+
for (size_t i = 0; i < ARRAYSIZE(c_rgApplicationBlacklist); ++i)
13113+
{
13114+
if (StrStrIW(exePath, c_rgApplicationBlacklist[i]))
13115+
{
13116+
return E_NOINTERFACE;
13117+
}
13118+
}
13119+
1310213120
TCHAR wszSearchIndexerPath[MAX_PATH];
1310313121
GetSystemDirectoryW(wszSearchIndexerPath, MAX_PATH);
1310413122
wcscat_s(wszSearchIndexerPath, MAX_PATH, L"\\SearchIndexer.exe");

0 commit comments

Comments
 (0)