Module: wine Branch: master Commit: 931bf0573117771708c456523fb9aa8996860754 URL: http://source.winehq.org/git/wine.git/?a=commit;h=931bf0573117771708c456523f...
Author: Hans Leidekker hans@codeweavers.com Date: Fri Sep 17 15:19:56 2010 +0200
msi: Adjust the AdminUser property too after applying a patch.
---
dlls/msi/action.c | 2 +- dlls/msi/msipriv.h | 3 ++- dlls/msi/package.c | 9 ++++----- 3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 5eb4ae8..5fd371e 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -7498,7 +7498,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath, msi_clone_properties( package );
msi_parse_command_line( package, szCommandLine, FALSE ); - msi_adjust_allusers_property( package ); + msi_adjust_privilege_properties( package ); msi_set_context( package );
if (needs_ui_sequence( package)) diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index ebfcae7..94bac5d 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -768,7 +768,7 @@ extern UINT msi_package_add_info(MSIPACKAGE *, DWORD, DWORD, LPCWSTR, LPWSTR); extern UINT msi_package_add_media_disk(MSIPACKAGE *, DWORD, DWORD, DWORD, LPWSTR, LPWSTR); extern UINT msi_clone_properties(MSIPACKAGE *); extern UINT msi_set_context(MSIPACKAGE *); -extern void msi_adjust_allusers_property(MSIPACKAGE *); +extern void msi_adjust_privilege_properties(MSIPACKAGE *); extern UINT MSI_GetFeatureCost(MSIPACKAGE *, MSIFEATURE *, MSICOSTTREE, INSTALLSTATE, LPINT);
/* for deformating */ @@ -1126,6 +1126,7 @@ static const WCHAR szMIMEDatabase[] = {'M','I','M','E','\','D','a','t','a','b', static const WCHAR szLocalPackage[] = {'L','o','c','a','l','P','a','c','k','a','g','e',0}; static const WCHAR szOriginalDatabase[] = {'O','r','i','g','i','n','a','l','D','a','t','a','b','a','s','e',0}; static const WCHAR szUpgradeCode[] = {'U','p','g','r','a','d','e','C','o','d','e',0}; +static const WCHAR szAdminUser[] = {'A','d','m','i','n','U','s','e','r',0};
/* memory allocation macro functions */ static void *msi_alloc( size_t len ) __WINE_ALLOC_SIZE(1); diff --git a/dlls/msi/package.c b/dlls/msi/package.c index c386f89..4e7692f 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -660,8 +660,6 @@ static VOID set_installer_properties(MSIPACKAGE *package) {'W','i','n','d','o','w','s','V','o','l','u','m','e',0}; static const WCHAR TF[]= {'T','e','m','p','F','o','l','d','e','r',0}; - static const WCHAR szAdminUser[] = -{'A','d','m','i','n','U','s','e','r',0}; static const WCHAR szPriv[] = {'P','r','i','v','i','l','e','g','e','d',0}; static const WCHAR v9x[] = { 'V','e','r','s','i','o','n','9','X',0 }; @@ -1054,7 +1052,7 @@ static UINT msi_load_admin_properties(MSIPACKAGE *package) return r; }
-void msi_adjust_allusers_property( MSIPACKAGE *package ) +void msi_adjust_privilege_properties( MSIPACKAGE *package ) { /* FIXME: this should depend on the user's privileges */ if (msi_get_property_int( package->db, szAllUsers, 0 ) == 2) @@ -1062,6 +1060,7 @@ void msi_adjust_allusers_property( MSIPACKAGE *package ) TRACE("resetting ALLUSERS property from 2 to 1\n"); msi_set_property( package->db, szAllUsers, szOne ); } + msi_set_property( package->db, szAdminUser, szOne ); }
MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url ) @@ -1086,7 +1085,7 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url )
create_temp_property_table( package ); msi_clone_properties( package ); - msi_adjust_allusers_property( package ); + msi_adjust_privilege_properties( package );
package->ProductCode = msi_dup_property( package->db, szProductCode ); package->script = msi_alloc_zero( sizeof(MSISCRIPT) ); @@ -1423,7 +1422,7 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage) if (index) { msi_clone_properties( package ); - msi_adjust_allusers_property( package ); + msi_adjust_privilege_properties( package ); }
*pPackage = package;