Commit 15ee85de authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Implement MsiGet/SetMode(MSIRUNMODE_REBOOTNOW).

parent a6b3d770
......@@ -764,6 +764,10 @@ BOOL WINAPI MsiGetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode)
r = package->need_reboot_at_end;
break;
case MSIRUNMODE_REBOOTNOW:
r = package->need_reboot_now;
break;
case MSIRUNMODE_LOGENABLED:
r = (package->log_file != INVALID_HANDLE_VALUE);
break;
......@@ -819,8 +823,8 @@ UINT WINAPI MsiSetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode, BOOL fState)
break;
case MSIRUNMODE_REBOOTNOW:
FIXME("unimplemented run mode: %d\n", iRunMode);
r = ERROR_FUNCTION_FAILED;
package->need_reboot_now = (fState != 0);
r = ERROR_SUCCESS;
break;
default:
......
......@@ -407,6 +407,7 @@ typedef struct tagMSIPACKAGE
unsigned char commit_action_running : 1;
unsigned char rollback_action_running : 1;
unsigned char need_reboot_at_end : 1;
unsigned char need_reboot_now : 1;
unsigned char need_rollback : 1;
} MSIPACKAGE;
......
......@@ -1887,7 +1887,7 @@ static void test_Session(IDispatch *pSession)
ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr);
hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTNOW, TRUE);
todo_wine ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr);
ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr);
if (hr == DISP_E_EXCEPTION) ok_exception(hr, szModeFlag);
hr = Session_ModeGet(pSession, MSIRUNMODE_REBOOTNOW, &bool);
......@@ -1895,7 +1895,7 @@ static void test_Session(IDispatch *pSession)
ok(bool, "Reboot now mode is %d, expected 1\n", bool);
hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTNOW, FALSE); /* set it again so we don't reboot */
todo_wine ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr);
ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr);
if (hr == DISP_E_EXCEPTION) ok_exception(hr, szModeFlag);
hr = Session_ModePut(pSession, MSIRUNMODE_MAINTENANCE, TRUE);
......
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