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

This commit is contained in:
Hans Leidekker 2010-09-17 15:19:56 +02:00 committed by Alexandre Julliard
parent 9f4d6c6edc
commit 931bf05731
3 changed files with 7 additions and 7 deletions

View File

@ -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))

View File

@ -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);

View File

@ -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;