mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-30 04:08:31 +00:00
wshom.ocx: Don't show a message box on ShellExecute error.
This commit is contained in:
parent
568e90ad11
commit
47e4907c0d
|
@ -1374,7 +1374,8 @@ static HRESULT WINAPI WshShell3_Run(IWshShell3 *iface, BSTR cmd, VARIANT *style,
|
||||||
|
|
||||||
memset(&info, 0, sizeof(info));
|
memset(&info, 0, sizeof(info));
|
||||||
info.cbSize = sizeof(info);
|
info.cbSize = sizeof(info);
|
||||||
info.fMask = waitforprocess ? SEE_MASK_NOASYNC | SEE_MASK_NOCLOSEPROCESS : SEE_MASK_DEFAULT;
|
info.fMask = SEE_MASK_FLAG_NO_UI;
|
||||||
|
info.fMask |= waitforprocess ? SEE_MASK_NOASYNC | SEE_MASK_NOCLOSEPROCESS : SEE_MASK_DEFAULT;
|
||||||
info.lpFile = file;
|
info.lpFile = file;
|
||||||
info.lpParameters = params;
|
info.lpParameters = params;
|
||||||
info.nShow = show;
|
info.nShow = show;
|
||||||
|
@ -1384,7 +1385,7 @@ static HRESULT WINAPI WshShell3_Run(IWshShell3 *iface, BSTR cmd, VARIANT *style,
|
||||||
if (!ret)
|
if (!ret)
|
||||||
{
|
{
|
||||||
TRACE("ShellExecute failed, %ld\n", GetLastError());
|
TRACE("ShellExecute failed, %ld\n", GetLastError());
|
||||||
return HRESULT_FROM_WIN32(GetLastError());
|
*exit_code = GetLastError();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1399,8 +1400,8 @@ static HRESULT WINAPI WshShell3_Run(IWshShell3 *iface, BSTR cmd, VARIANT *style,
|
||||||
else
|
else
|
||||||
*exit_code = 0;
|
*exit_code = 0;
|
||||||
|
|
||||||
return S_OK;
|
|
||||||
}
|
}
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct popup_thread_param
|
struct popup_thread_param
|
||||||
|
|
|
@ -284,7 +284,7 @@ static void test_wshshell(void)
|
||||||
str = SysAllocString(L"\"cmd.exe \" /c rd /s /q c:\\nosuchdir");
|
str = SysAllocString(L"\"cmd.exe \" /c rd /s /q c:\\nosuchdir");
|
||||||
hr = IWshShell3_Run(sh3, str, &arg, &arg2, &retval);
|
hr = IWshShell3_Run(sh3, str, &arg, &arg2, &retval);
|
||||||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||||
todo_wine ok(retval == ERROR_FILE_NOT_FOUND, "Unexpected retval %d.\n", retval);
|
ok(retval == ERROR_FILE_NOT_FOUND, "Unexpected retval %d.\n", retval);
|
||||||
SysFreeString(str);
|
SysFreeString(str);
|
||||||
|
|
||||||
GetSystemDirectoryW(path, ARRAY_SIZE(path));
|
GetSystemDirectoryW(path, ARRAY_SIZE(path));
|
||||||
|
|
Loading…
Reference in a new issue