diff --git a/dll/win32/shell32/shlexec.cpp b/dll/win32/shell32/shlexec.cpp index 68befd32925..6af8844632e 100644 --- a/dll/win32/shell32/shlexec.cpp +++ b/dll/win32/shell32/shlexec.cpp @@ -2341,6 +2341,8 @@ HINSTANCE WINAPI ShellExecuteA(HWND hWnd, LPCSTR lpVerb, LPCSTR lpFile, sei.dwHotKey = 0; sei.hProcess = 0; + if (!(SHGetAppCompatFlags(SHACF_WIN95SHLEXEC) & SHACF_WIN95SHLEXEC)) + sei.fMask |= SEE_MASK_NOASYNC; ShellExecuteExA(&sei); return sei.hInstApp; } @@ -2479,9 +2481,6 @@ ShellExecuteExW(LPSHELLEXECUTEINFOW sei) /************************************************************************* * ShellExecuteW [SHELL32.294] - * from shellapi.h - * WINSHELLAPI HINSTANCE APIENTRY ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, - * LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd); */ HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd) @@ -2503,7 +2502,9 @@ HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, sei.dwHotKey = 0; sei.hProcess = 0; - SHELL_execute(&sei, SHELL_ExecuteW); + if (!(SHGetAppCompatFlags(SHACF_WIN95SHLEXEC) & SHACF_WIN95SHLEXEC)) + sei.fMask |= SEE_MASK_NOASYNC; + ShellExecuteExW(&sei); return sei.hInstApp; } diff --git a/sdk/include/reactos/shlwapi_undoc.h b/sdk/include/reactos/shlwapi_undoc.h index def0725cdd2..c3ffe8c93df 100644 --- a/sdk/include/reactos/shlwapi_undoc.h +++ b/sdk/include/reactos/shlwapi_undoc.h @@ -364,6 +364,9 @@ IContextMenu_Invoke( DWORD WINAPI SHGetObjectCompatFlags(IUnknown *pUnk, const CLSID *clsid); +#define SHACF_WIN95SHLEXEC 0x00000200 /* Geoff Chappell */ +DWORD WINAPI SHGetAppCompatFlags(DWORD dwMask); + /* * HACK! These functions are conflicting with inline functions... * We provide a macro option SHLWAPI_ISHELLFOLDER_HELPERS for using these functions.