diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 5e9ef35ac40..b3472f88558 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -480,7 +480,7 @@ UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace) static BOOL needs_ui_sequence(MSIPACKAGE *package) { - return (gUILevel & INSTALLUILEVEL_MASK) >= INSTALLUILEVEL_REDUCED; + return (package->ui_level & INSTALLUILEVEL_MASK) >= INSTALLUILEVEL_REDUCED; } UINT msi_set_context(MSIPACKAGE *package) @@ -2954,7 +2954,7 @@ static UINT ITERATE_LaunchConditions(MSIRECORD *row, LPVOID param) r = MSI_EvaluateConditionW(package,cond); if (r == MSICONDITION_FALSE) { - if ((gUILevel & INSTALLUILEVEL_MASK) != INSTALLUILEVEL_NONE) + if ((package->ui_level & INSTALLUILEVEL_MASK) != INSTALLUILEVEL_NONE) { LPWSTR deformated; message = MSI_RecordGetString(row,2); diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index 75437673761..9e50035e081 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -903,11 +903,11 @@ static UINT HANDLE_CustomType19(MSIPACKAGE *package, LPCWSTR source, if( row ) { LPCWSTR error = MSI_RecordGetString( row, 1 ); - if ((gUILevel & INSTALLUILEVEL_MASK) != INSTALLUILEVEL_NONE) + if ((package->ui_level & INSTALLUILEVEL_MASK) != INSTALLUILEVEL_NONE) MessageBoxW( NULL, error, NULL, MB_OK ); msiobj_release( &row->hdr ); } - else if ((gUILevel & INSTALLUILEVEL_MASK) != INSTALLUILEVEL_NONE) + else if ((package->ui_level & INSTALLUILEVEL_MASK) != INSTALLUILEVEL_NONE) MessageBoxW( NULL, deformated, NULL, MB_OK ); msi_free( deformated ); diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index 04a4a6bd1a6..a90d379865b 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -3978,7 +3978,7 @@ UINT msi_spawn_error_dialog( MSIPACKAGE *package, LPWSTR error_dialog, LPWSTR er 'M','S','I','E','r','r','o','r','D','i','a','l','o','g','R','e','s','u','l','t',0 }; - if ((gUILevel & INSTALLUILEVEL_MASK) == INSTALLUILEVEL_NONE) return ERROR_SUCCESS; + if ((package->ui_level & INSTALLUILEVEL_MASK) == INSTALLUILEVEL_NONE) return ERROR_SUCCESS; if ( !error_dialog ) { diff --git a/dlls/msi/media.c b/dlls/msi/media.c index 9a012771c95..612624df6bf 100644 --- a/dlls/msi/media.c +++ b/dlls/msi/media.c @@ -77,7 +77,7 @@ static UINT msi_change_media(MSIPACKAGE *package, MSIMEDIAINFO *mi) static const WCHAR error_prop[] = {'E','r','r','o','r','D','i','a','l','o','g',0}; - if ((gUILevel & INSTALLUILEVEL_MASK) == INSTALLUILEVEL_NONE && + if ((package->ui_level & INSTALLUILEVEL_MASK) == INSTALLUILEVEL_NONE && !gUIHandlerA && !gUIHandlerW && !gUIHandlerRecord) return ERROR_SUCCESS; error = msi_build_error_string(package, 1302, 1, mi->disk_prompt); diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 4ed4fd614a6..dc748e218e6 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -389,6 +389,7 @@ typedef struct tagMSIPACKAGE LPWSTR localfile; BOOL delete_on_close; + INSTALLUILEVEL ui_level; UINT CurrentInstallState; msi_dialog *dialog; LPWSTR next_dialog; diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 834467f21b7..ca836ec9c45 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -1180,6 +1180,7 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url ) set_installed_prop( package ); set_installer_properties( package ); + package->ui_level = gUILevel; sprintfW( uilevel, fmtW, gUILevel & INSTALLUILEVEL_MASK ); msi_set_property(package->db, szUILevel, uilevel);