Index: base/shell/explorer/CMakeLists.txt =================================================================== --- base/shell/explorer/CMakeLists.txt (revision 56363) +++ base/shell/explorer/CMakeLists.txt (working copy) @@ -66,7 +66,7 @@ wine uuid) -add_importlibs(explorer advapi32 gdi32 user32 ws2_32 msimg32 comctl32 ole32 oleaut32 shell32 notifyhook msvcrt kernel32 ntdll) +add_importlibs(explorer advapi32 gdi32 user32 ws2_32 msimg32 comctl32 ole32 oleaut32 shell32 shlwapi notifyhook msvcrt kernel32 ntdll) set_image_base(explorer 0x00400000) add_dependencies(explorer psdk) add_cd_file(TARGET explorer DESTINATION reactos FOR all) Index: base/shell/explorer/explorer.cpp =================================================================== --- base/shell/explorer/explorer.cpp (revision 56363) +++ base/shell/explorer/explorer.cpp (working copy) @@ -51,6 +51,7 @@ ExplorerGlobals g_Globals; +boolean SelectOpt=FALSE; ExplorerGlobals::ExplorerGlobals() @@ -803,13 +804,32 @@ _mdi = true; else if (!_tcsicmp(option, TEXT("sdi"))) _mdi = false; - else - return false; - } else { - if (!_path.empty()) - return false; + else if (!_tcsicmp(option, TEXT("n"))) + { + //Do nothing + } + else if (!_tcsicmp(option, TEXT("select"))) + { + SelectOpt = TRUE; + } + else + return false; + } else { + if (!_path.empty()) + return false; - _path = opt_str; + if((SelectOpt == TRUE) && (PathFileExists(option))) + { + WCHAR szDir[MAX_PATH]; + + _wsplitpath(option, szPath, szDir, NULL, NULL); + wcscat(szPath, szDir); + PathRemoveBackslash(szPath); + _path = szPath; + SelectOpt = FALSE; + } + else + _path = opt_str; } return true; Index: base/shell/explorer/explorer.h =================================================================== --- base/shell/explorer/explorer.h (revision 56363) +++ base/shell/explorer/explorer.h (working copy) @@ -110,6 +110,7 @@ bool IsValidPath() const; String _path; + WCHAR szPath[MAX_PATH]; int _flags; // OPEN_WINDOW_MODE int _cmdShow; bool _mdi; Index: base/shell/explorer/precomp.h =================================================================== --- base/shell/explorer/precomp.h (revision 56363) +++ base/shell/explorer/precomp.h (working copy) @@ -29,6 +29,7 @@ #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT 1 #include +#include "shlwapi.h" #include "utility/utility.h"