[NCPA] DisplayApplet: 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:09:36 +07:00
parent ab0e04c81d
commit 48c036e7e7
2 changed files with 5 additions and 2 deletions

View File

@ -6,5 +6,5 @@ add_library(ncpa MODULE
${CMAKE_CURRENT_BINARY_DIR}/ncpa.def)
set_module_type(ncpa cpl UNICODE)
add_importlibs(ncpa advapi32 shell32 msvcrt kernel32)
add_importlibs(ncpa user32 advapi32 shell32 msvcrt kernel32)
add_cd_file(TARGET ncpa DESTINATION reactos/system32 FOR all)

View File

@ -20,7 +20,10 @@ DisplayApplet(VOID)
{
WCHAR szParameters[] = L"/n,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}";
return (INT_PTR) ShellExecuteW(NULL, L"open", L"explorer.exe", szParameters, NULL, SW_SHOWDEFAULT) > 32;
/* NOTE: If Explorer shell is not available, use ReactOS's alternative file browser instead */
return (INT_PTR) ShellExecuteW(NULL, L"open",
GetShellWindow() ? L"explorer.exe" : L"filebrowser.exe",
szParameters, NULL, SW_SHOWDEFAULT) > 32;
}
/* Control Panel Callback */