Hans Leidekker : msi: Implement MSIRUNMODE_MAINTENANCE and MSIRUNMODE_REBOOTATEND for MsiGetMode .
Alexandre Julliard
julliard at winehq.org
Thu Feb 18 12:49:24 CST 2010
Module: wine
Branch: master
Commit: 65c68efc8dc2d211454857aba38271c0f956c209
URL: http://source.winehq.org/git/wine.git/?a=commit;h=65c68efc8dc2d211454857aba38271c0f956c209
Author: Hans Leidekker <hans at codeweavers.com>
Date: Thu Feb 18 12:47:21 2010 +0100
msi: Implement MSIRUNMODE_MAINTENANCE and MSIRUNMODE_REBOOTATEND for MsiGetMode.
---
dlls/msi/install.c | 12 +++++++++++-
dlls/msi/tests/automation.c | 4 ++--
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/dlls/msi/install.c b/dlls/msi/install.c
index 7a71867..6e19863 100644
--- a/dlls/msi/install.c
+++ b/dlls/msi/install.c
@@ -661,6 +661,8 @@ BOOL WINAPI MsiGetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode)
MSIPACKAGE *package;
BOOL r = FALSE;
+ TRACE("%d %d\n", hInstall, iRunMode);
+
package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE);
if (!package)
{
@@ -706,8 +708,16 @@ BOOL WINAPI MsiGetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode)
r = package->commit_action_running;
break;
+ case MSIRUNMODE_MAINTENANCE:
+ r = msi_get_property_int( package, szInstalled, 0 ) != 0;
+ break;
+
+ case MSIRUNMODE_REBOOTATEND:
+ r = package->need_reboot;
+ break;
+
default:
- FIXME("%d %d\n", hInstall, iRunMode);
+ FIXME("unimplemented run mode\n");
r = TRUE;
}
diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c
index cab6cb7..edc6cbe 100644
--- a/dlls/msi/tests/automation.c
+++ b/dlls/msi/tests/automation.c
@@ -1863,11 +1863,11 @@ static void test_Session(IDispatch *pSession)
/* Session::Mode, get */
hr = Session_ModeGet(pSession, MSIRUNMODE_REBOOTATEND, &bool);
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);
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 */
hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTATEND, TRUE);
More information about the wine-cvs
mailing list