diff --git a/dlls/wshom.ocx/shell.c b/dlls/wshom.ocx/shell.c index 5d58ac74ed9..d423856ce7a 100644 --- a/dlls/wshom.ocx/shell.c +++ b/dlls/wshom.ocx/shell.c @@ -1297,6 +1297,7 @@ static HRESULT WINAPI WshShell3_Run(IWshShell3 *iface, BSTR cmd, VARIANT *style, { if (waitforprocess) { + WaitForSingleObject(info.hProcess, INFINITE); GetExitCodeProcess(info.hProcess, exit_code); CloseHandle(info.hProcess); }