From cd0bb1af074b3a8d35b7eddae271d6e5ab484795 Mon Sep 17 00:00:00 2001 From: Thamatip Chitpong Date: Mon, 22 Apr 2024 21:04:23 +0700 Subject: [PATCH] [TASKMGR] Process page: Allow using "Open File Location" functionality without running Explorer shell If Explorer shell is not available, use ReactOS's alternative file browser instead. --- base/applications/taskmgr/procpage.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/base/applications/taskmgr/procpage.c b/base/applications/taskmgr/procpage.c index 61043b14d85..1d16f2a3b83 100644 --- a/base/applications/taskmgr/procpage.c +++ b/base/applications/taskmgr/procpage.c @@ -1248,8 +1248,11 @@ void ProcessPage_OnOpenFileLocation(void) StringCchPrintfW(pszCmdLine, dwLength, szCmdFormat, pszExePath); - /* Call the shell to open the file location and select it */ - ShellExecuteW(NULL, L"open", L"explorer.exe", pszCmdLine, NULL, SW_SHOWNORMAL); + /* Call the shell to open the file location and select it. If Explorer shell + * is not available, use ReactOS's alternative file browser instead. */ + ShellExecuteW(NULL, L"open", + GetShellWindow() ? L"explorer.exe" : L"filebrowser.exe", + pszCmdLine, NULL, SW_SHOWNORMAL); Cleanup: HeapFree(GetProcessHeap(), 0, pszCmdLine);