diff --git a/programs/explorer/Makefile.in b/programs/explorer/Makefile.in index 6fe3faebc7f..d31757000c1 100644 --- a/programs/explorer/Makefile.in +++ b/programs/explorer/Makefile.in @@ -2,7 +2,7 @@ EXTRADEFS = -DWINE_NO_UNICODE_MACROS MODULE = explorer.exe APPMODE = -mwindows -municode IMPORTS = rpcrt4 user32 gdi32 advapi32 -DELAYIMPORTS = comctl32 shell32 ole32 +DELAYIMPORTS = comctl32 shell32 ole32 shlwapi C_SRCS = \ appbar.c \ diff --git a/programs/explorer/explorer.c b/programs/explorer/explorer.c index 9ada5d20633..35080a3ca1a 100644 --- a/programs/explorer/explorer.c +++ b/programs/explorer/explorer.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -755,6 +756,9 @@ int WINAPI wWinMain(HINSTANCE hinstance, WINE_ERR("Could not initialize COM\n"); ExitProcess(EXIT_FAILURE); } + if(parameters.root[0] && !PathIsDirectoryW(parameters.root)) + if(ShellExecuteW(NULL,NULL,parameters.root,NULL,NULL,SW_SHOWDEFAULT) > (HINSTANCE)32) + ExitProcess(EXIT_SUCCESS); init_info.dwSize = sizeof(INITCOMMONCONTROLSEX); init_info.dwICC = ICC_USEREX_CLASSES | ICC_BAR_CLASSES | ICC_COOL_CLASSES; if(!InitCommonControlsEx(&init_info))