Commit 65c68efc authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Implement MSIRUNMODE_MAINTENANCE and MSIRUNMODE_REBOOTATEND for MsiGetMode.

parent a11882fc
...@@ -661,6 +661,8 @@ BOOL WINAPI MsiGetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode) ...@@ -661,6 +661,8 @@ BOOL WINAPI MsiGetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode)
MSIPACKAGE *package; MSIPACKAGE *package;
BOOL r = FALSE; BOOL r = FALSE;
TRACE("%d %d\n", hInstall, iRunMode);
package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE); package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE);
if (!package) if (!package)
{ {
...@@ -706,8 +708,16 @@ BOOL WINAPI MsiGetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode) ...@@ -706,8 +708,16 @@ BOOL WINAPI MsiGetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode)
r = package->commit_action_running; r = package->commit_action_running;
break; break;
case MSIRUNMODE_MAINTENANCE:
r = msi_get_property_int( package, szInstalled, 0 ) != 0;
break;
case MSIRUNMODE_REBOOTATEND:
r = package->need_reboot;
break;
default: default:
FIXME("%d %d\n", hInstall, iRunMode); FIXME("unimplemented run mode\n");
r = TRUE; r = TRUE;
} }
......
...@@ -1863,11 +1863,11 @@ static void test_Session(IDispatch *pSession) ...@@ -1863,11 +1863,11 @@ static void test_Session(IDispatch *pSession)
/* Session::Mode, get */ /* Session::Mode, get */
hr = Session_ModeGet(pSession, MSIRUNMODE_REBOOTATEND, &bool); hr = Session_ModeGet(pSession, MSIRUNMODE_REBOOTATEND, &bool);
ok(hr == S_OK, "Session_ModeGet failed, hresult 0x%08x\n", hr); ok(hr == S_OK, "Session_ModeGet failed, hresult 0x%08x\n", hr);
todo_wine ok(!bool, "Reboot at end session mode is %d\n", bool); ok(!bool, "Reboot at end session mode is %d\n", bool);
hr = Session_ModeGet(pSession, MSIRUNMODE_MAINTENANCE, &bool); hr = Session_ModeGet(pSession, MSIRUNMODE_MAINTENANCE, &bool);
ok(hr == S_OK, "Session_ModeGet failed, hresult 0x%08x\n", hr); ok(hr == S_OK, "Session_ModeGet failed, hresult 0x%08x\n", hr);
todo_wine ok(!bool, "Maintenance mode is %d\n", bool); ok(!bool, "Maintenance mode is %d\n", bool);
/* Session::Mode, put */ /* Session::Mode, put */
hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTATEND, TRUE); hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTATEND, 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