Commit 931bf057 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Adjust the AdminUser property too after applying a patch.

parent 9f4d6c6e
...@@ -7498,7 +7498,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath, ...@@ -7498,7 +7498,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
msi_clone_properties( package ); msi_clone_properties( package );
msi_parse_command_line( package, szCommandLine, FALSE ); msi_parse_command_line( package, szCommandLine, FALSE );
msi_adjust_allusers_property( package ); msi_adjust_privilege_properties( package );
msi_set_context( package ); msi_set_context( package );
if (needs_ui_sequence( package)) if (needs_ui_sequence( package))
......
...@@ -768,7 +768,7 @@ extern UINT msi_package_add_info(MSIPACKAGE *, DWORD, DWORD, LPCWSTR, LPWSTR); ...@@ -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_package_add_media_disk(MSIPACKAGE *, DWORD, DWORD, DWORD, LPWSTR, LPWSTR);
extern UINT msi_clone_properties(MSIPACKAGE *); extern UINT msi_clone_properties(MSIPACKAGE *);
extern UINT msi_set_context(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); extern UINT MSI_GetFeatureCost(MSIPACKAGE *, MSIFEATURE *, MSICOSTTREE, INSTALLSTATE, LPINT);
/* for deformating */ /* for deformating */
...@@ -1126,6 +1126,7 @@ static const WCHAR szMIMEDatabase[] = {'M','I','M','E','\\','D','a','t','a','b', ...@@ -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 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 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 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 */ /* memory allocation macro functions */
static void *msi_alloc( size_t len ) __WINE_ALLOC_SIZE(1); static void *msi_alloc( size_t len ) __WINE_ALLOC_SIZE(1);
......
...@@ -660,8 +660,6 @@ static VOID set_installer_properties(MSIPACKAGE *package) ...@@ -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}; {'W','i','n','d','o','w','s','V','o','l','u','m','e',0};
static const WCHAR TF[]= static const WCHAR TF[]=
{'T','e','m','p','F','o','l','d','e','r',0}; {'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[] = static const WCHAR szPriv[] =
{'P','r','i','v','i','l','e','g','e','d',0}; {'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 }; 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) ...@@ -1054,7 +1052,7 @@ static UINT msi_load_admin_properties(MSIPACKAGE *package)
return r; 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 */ /* FIXME: this should depend on the user's privileges */
if (msi_get_property_int( package->db, szAllUsers, 0 ) == 2) if (msi_get_property_int( package->db, szAllUsers, 0 ) == 2)
...@@ -1062,6 +1060,7 @@ void msi_adjust_allusers_property( MSIPACKAGE *package ) ...@@ -1062,6 +1060,7 @@ void msi_adjust_allusers_property( MSIPACKAGE *package )
TRACE("resetting ALLUSERS property from 2 to 1\n"); TRACE("resetting ALLUSERS property from 2 to 1\n");
msi_set_property( package->db, szAllUsers, szOne ); msi_set_property( package->db, szAllUsers, szOne );
} }
msi_set_property( package->db, szAdminUser, szOne );
} }
MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url ) MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url )
...@@ -1086,7 +1085,7 @@ 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 ); create_temp_property_table( package );
msi_clone_properties( package ); msi_clone_properties( package );
msi_adjust_allusers_property( package ); msi_adjust_privilege_properties( package );
package->ProductCode = msi_dup_property( package->db, szProductCode ); package->ProductCode = msi_dup_property( package->db, szProductCode );
package->script = msi_alloc_zero( sizeof(MSISCRIPT) ); package->script = msi_alloc_zero( sizeof(MSISCRIPT) );
...@@ -1423,7 +1422,7 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage) ...@@ -1423,7 +1422,7 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
if (index) if (index)
{ {
msi_clone_properties( package ); msi_clone_properties( package );
msi_adjust_allusers_property( package ); msi_adjust_privilege_properties( package );
} }
*pPackage = package; *pPackage = package;
......
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