From 7bcac31dcf4b37a0780efaf06540351e2c3543b3 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Wed, 19 Jul 2006 11:17:16 -0700 Subject: [PATCH] msi: Update feature states after changing install levels, as they may have changed. --- dlls/msi/action.c | 2 +- dlls/msi/install.c | 6 ++++++ dlls/msi/msipriv.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index d6ca5d7f7e9..d7be3b52b92 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -1590,7 +1590,7 @@ static BOOL process_state_property (MSIPACKAGE* package, LPCWSTR property, return TRUE; } -static UINT MSI_SetFeatureStates(MSIPACKAGE *package) +UINT MSI_SetFeatureStates(MSIPACKAGE *package) { int install_level; static const WCHAR szlevel[] = diff --git a/dlls/msi/install.c b/dlls/msi/install.c index cb43403a675..38888efb619 100644 --- a/dlls/msi/install.c +++ b/dlls/msi/install.c @@ -785,6 +785,12 @@ UINT WINAPI MsiSetInstallLevel(MSIHANDLE hInstall, int iInstallLevel) sprintfW( level, fmt, iInstallLevel ); r = MSI_SetPropertyW( package, szInstallLevel, level ); + if ( r == ERROR_SUCCESS ) + { + r = MSI_SetFeatureStates( package ); + } + msiobj_release( &package->hdr ); + return r; } diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 999b4caf16b..a56b9fef4a1 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -339,6 +339,7 @@ extern UINT MSI_InstallPackage( MSIPACKAGE *, LPCWSTR, LPCWSTR ); extern void ACTION_free_package_structures( MSIPACKAGE* ); extern UINT ACTION_DialogBox( MSIPACKAGE*, LPCWSTR); extern UINT MSI_Sequence( MSIPACKAGE *package, LPCWSTR szTable, INT iSequenceMode ); +extern UINT MSI_SetFeatureStates( MSIPACKAGE *package ); /* record internals */ extern UINT MSI_RecordSetIStream( MSIRECORD *, unsigned int, IStream *);