diff --git a/dlls/msi/automation.c b/dlls/msi/automation.c index 07994e10c5e..169ad813b90 100644 --- a/dlls/msi/automation.c +++ b/dlls/msi/automation.c @@ -686,6 +686,14 @@ static HRESULT WINAPI SessionImpl_Invoke( switch (dispIdMember) { + case DISPID_SESSION_INSTALLER: + if (wFlags & DISPATCH_PROPERTYGET) { + V_VT(pVarResult) = VT_DISPATCH; + IDispatch_AddRef(This->pInstaller); + V_DISPATCH(pVarResult) = This->pInstaller; + } + break; + case DISPID_SESSION_PROPERTY: if (wFlags & DISPATCH_PROPERTYGET) { hr = DispGetParam(pDispParams, 0, VT_BSTR, &varg0, puArgErr); diff --git a/dlls/msi/msiserver.idl b/dlls/msi/msiserver.idl index 4d6c00b6759..09ea7c74b66 100644 --- a/dlls/msi/msiserver.idl +++ b/dlls/msi/msiserver.idl @@ -163,6 +163,8 @@ library WindowsInstaller { properties: methods: + [id(DISPID_SESSION_INSTALLER), propget] + Installer *Installer(); [id(DISPID_SESSION_PROPERTY), propget] BSTR Property([in] BSTR PropertyName); [id(DISPID_SESSION_PROPERTY), propput] diff --git a/dlls/msi/msiserver_dispids.h b/dlls/msi/msiserver_dispids.h index 1c7a17f5af3..e5efa3eedcd 100644 --- a/dlls/msi/msiserver_dispids.h +++ b/dlls/msi/msiserver_dispids.h @@ -26,6 +26,7 @@ #define DISPID_DATABASE_OPENVIEW 3 +#define DISPID_SESSION_INSTALLER 1 #define DISPID_SESSION_PROPERTY 2 #define DISPID_SESSION_LANGUAGE 3 #define DISPID_SESSION_MODE 4 diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c index d4977ab1bf1..91e7b9a8eca 100644 --- a/dlls/msi/tests/automation.c +++ b/dlls/msi/tests/automation.c @@ -908,12 +908,10 @@ static void test_Session(IDispatch *pSession) HRESULT hr; /* Session::Installer */ - todo_wine { - hr = Session_Installer(pSession, &pInst); - ok(SUCCEEDED(hr), "Session_Installer failed, hresult 0x%08x\n", hr); - ok(pInst != NULL, "Session_Installer returned NULL IDispatch pointer\n"); - ok(pInst == pInstaller, "Session_Installer does not match Installer instance from CoCreateInstance\n"); - } + hr = Session_Installer(pSession, &pInst); + ok(SUCCEEDED(hr), "Session_Installer failed, hresult 0x%08x\n", hr); + ok(pInst != NULL, "Session_Installer returned NULL IDispatch pointer\n"); + ok(pInst == pInstaller, "Session_Installer does not match Installer instance from CoCreateInstance\n"); /* Session::Property, get */ memset(stringw, 0, sizeof(stringw));