[CONTROL] OpenShellFolder: Add file browser fallback

If Explorer shell is not available, use ReactOS's alternative file browser instead.
CORE-19648
This commit is contained in:
Thamatip Chitpong 2024-06-08 22:29:42 +07:00
parent 48c036e7e7
commit 8398c9fcfb

View File

@ -74,15 +74,16 @@ OpenShellFolder(LPWSTR lpFolderCLSID)
WCHAR szParameters[MAX_PATH];
/*
* Open a shell folder using "explorer.exe". The passed CLSIDs
* are all subfolders of the "Control Panel" shell folder.
* Open a shell folder using "explorer.exe". If Explorer shell is not
* available, use ReactOS's alternative file browser instead.
* The passed CLSIDs are all subfolders of the "Control Panel" shell folder.
*/
StringCbCopyW(szParameters, sizeof(szParameters), L"/n,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}");
StringCbCatW(szParameters, sizeof(szParameters), lpFolderCLSID);
return (INT_PTR)ShellExecuteW(NULL,
L"open",
L"explorer.exe",
GetShellWindow() ? L"explorer.exe" : L"filebrowser.exe",
szParameters,
NULL,
SW_SHOWDEFAULT) > 32;