Commit c268c40f authored by Jay Yang's avatar Jay Yang Committed by Alexandre Julliard

explorer: Try ShellExecute if the parameter isn't a directory.

parent 70239648
......@@ -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 \
......
......@@ -32,6 +32,7 @@
#include <windows.h>
#include <shobjidl.h>
#include <shlobj.h>
#include <shlwapi.h>
#include <commoncontrols.h>
#include <commctrl.h>
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment