From f9c68dfd920702f5c81b3631344c59b1134e0f8f Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Fri, 7 Jul 2017 09:03:15 -0500 Subject: [PATCH] msi: Use the given record for INSTALLMESSAGE_ACTIONDATA. Signed-off-by: Zebediah Figura Signed-off-by: Hans Leidekker Signed-off-by: Alexandre Julliard --- dlls/msi/action.c | 103 ++++++++++++++----------------------------- dlls/msi/appsearch.c | 2 +- dlls/msi/assembly.c | 4 +- dlls/msi/classes.c | 16 +++---- dlls/msi/files.c | 12 ++--- dlls/msi/font.c | 4 +- dlls/msi/msipriv.h | 1 - dlls/msi/package.c | 1 + dlls/msi/upgrade.c | 2 +- 9 files changed, 55 insertions(+), 90 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 741e8341ea9..3f97c825119 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -736,41 +736,6 @@ void msi_ui_progress( MSIPACKAGE *package, int a, int b, int c, int d ) msi_dialog_check_messages( NULL ); } -void msi_ui_actiondata( MSIPACKAGE *package, const WCHAR *action, MSIRECORD *record ) -{ - static const WCHAR query[] = - {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ', - '`','A','c','t','i','o', 'n','T','e','x','t','`',' ', - 'W','H','E','R','E',' ', '`','A','c','t','i','o','n','`',' ','=',' ','\'','%','s','\'',0}; - WCHAR message[1024]; - MSIRECORD *row = 0; - DWORD size; - - if (!package->LastAction || strcmpW( package->LastAction, action )) - { - if (!(row = MSI_QueryGetRecord( package->db, query, action ))) return; - - if (MSI_RecordIsNull( row, 3 )) - { - msiobj_release( &row->hdr ); - return; - } - /* update the cached action format */ - msi_free( package->ActionFormat ); - package->ActionFormat = msi_dup_record_field( row, 3 ); - msi_free( package->LastAction ); - package->LastAction = strdupW( action ); - msiobj_release( &row->hdr ); - } - size = 1024; - MSI_RecordSetStringW( record, 0, package->ActionFormat ); - MSI_FormatRecordW( package, record, message, &size ); - row = MSI_CreateRecord( 1 ); - MSI_RecordSetStringW( row, 1, message ); - MSI_ProcessMessage( package, INSTALLMESSAGE_ACTIONDATA, row ); - msiobj_release( &row->hdr ); -} - INSTALLSTATE msi_get_component_action( MSIPACKAGE *package, MSICOMPONENT *comp ) { if (!comp->Enabled) @@ -825,7 +790,7 @@ static UINT ITERATE_CreateFolders(MSIRECORD *row, LPVOID param) uirow = MSI_CreateRecord(1); MSI_RecordSetStringW(uirow, 1, dir); - msi_ui_actiondata(package, szCreateFolders, uirow); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release(&uirow->hdr); full_path = msi_get_target_folder( package, dir ); @@ -913,7 +878,7 @@ static UINT ITERATE_RemoveFolders( MSIRECORD *row, LPVOID param ) uirow = MSI_CreateRecord( 1 ); MSI_RecordSetStringW( uirow, 1, dir ); - msi_ui_actiondata( package, szRemoveFolders, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); folder = msi_get_loaded_folder( package, dir ); @@ -2974,7 +2939,7 @@ static UINT ITERATE_WriteRegistryValues(MSIRECORD *row, LPVOID param) MSI_RecordSetStringW(uirow,1,uikey); if (type == REG_SZ || type == REG_EXPAND_SZ) MSI_RecordSetStringW(uirow, 3, (LPWSTR)new_value); - msi_ui_actiondata( package, szWriteRegistryValues, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); msi_free(new_value); @@ -3128,7 +3093,7 @@ static UINT ITERATE_RemoveRegistryValuesOnUninstall( MSIRECORD *row, LPVOID para uirow = MSI_CreateRecord( 2 ); MSI_RecordSetStringW( uirow, 1, ui_key_str ); MSI_RecordSetStringW( uirow, 2, deformated_name ); - msi_ui_actiondata( package, szRemoveRegistryValues, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); msi_free( ui_key_str ); @@ -3191,7 +3156,7 @@ static UINT ITERATE_RemoveRegistryValuesOnInstall( MSIRECORD *row, LPVOID param uirow = MSI_CreateRecord( 2 ); MSI_RecordSetStringW( uirow, 1, ui_key_str ); MSI_RecordSetStringW( uirow, 2, deformated_name ); - msi_ui_actiondata( package, szRemoveRegistryValues, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); msi_free( ui_key_str ); @@ -3650,7 +3615,7 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package) MSI_RecordSetStringW(uirow,1,package->ProductCode); MSI_RecordSetStringW(uirow,2,comp->ComponentId); MSI_RecordSetStringW(uirow,3,comp->FullKeypath); - msi_ui_actiondata( package, szProcessComponents, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); } return ERROR_SUCCESS; @@ -3744,7 +3709,7 @@ static UINT ITERATE_RegisterTypeLibraries(MSIRECORD *row, LPVOID param) TRACE("component has no key path\n"); return ERROR_SUCCESS; } - msi_ui_actiondata( package, szRegisterTypeLibraries, row ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, row); module = LoadLibraryExW( file->TargetPath, NULL, LOAD_LIBRARY_AS_DATAFILE ); if (module) @@ -3835,7 +3800,7 @@ static UINT ITERATE_UnregisterTypeLibraries( MSIRECORD *row, LPVOID param ) TRACE("component not scheduled for removal %s\n", debugstr_w(component)); return ERROR_SUCCESS; } - msi_ui_actiondata( package, szUnregisterTypeLibraries, row ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, row); guid = MSI_RecordGetString( row, 1 ); CLSIDFromString( guid, &libid ); @@ -3949,7 +3914,7 @@ static UINT ITERATE_CreateShortcuts(MSIRECORD *row, LPVOID param) TRACE("component not scheduled for installation %s\n", debugstr_w(component)); return ERROR_SUCCESS; } - msi_ui_actiondata( package, szCreateShortcuts, row ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, row); res = CoCreateInstance( &CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkW, (LPVOID *) &sl ); @@ -4080,7 +4045,7 @@ static UINT ITERATE_RemoveShortcuts( MSIRECORD *row, LPVOID param ) TRACE("component not scheduled for removal %s\n", debugstr_w(component)); return ERROR_SUCCESS; } - msi_ui_actiondata( package, szRemoveShortcuts, row ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, row); link_file = get_link_file( package, row ); @@ -4511,7 +4476,7 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) end: uirow = MSI_CreateRecord( 1 ); MSI_RecordSetStringW( uirow, 1, package->ProductCode ); - msi_ui_actiondata( package, szPublishProduct, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); RegCloseKey(hukey); @@ -4617,7 +4582,7 @@ static UINT ITERATE_WriteIniValues(MSIRECORD *row, LPVOID param) MSI_RecordSetStringW(uirow,2,deformated_section); MSI_RecordSetStringW(uirow,3,deformated_key); MSI_RecordSetStringW(uirow,4,deformated_value); - msi_ui_actiondata( package, szWriteIniValues, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); msi_free(fullname); @@ -4697,7 +4662,7 @@ static UINT ITERATE_RemoveIniValuesOnUninstall( MSIRECORD *row, LPVOID param ) MSI_RecordSetStringW( uirow, 2, deformated_section ); MSI_RecordSetStringW( uirow, 3, deformated_key ); MSI_RecordSetStringW( uirow, 4, deformated_value ); - msi_ui_actiondata( package, szRemoveIniValues, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); msi_free( deformated_key ); @@ -4758,7 +4723,7 @@ static UINT ITERATE_RemoveIniValuesOnInstall( MSIRECORD *row, LPVOID param ) MSI_RecordSetStringW( uirow, 2, deformated_section ); MSI_RecordSetStringW( uirow, 3, deformated_key ); MSI_RecordSetStringW( uirow, 4, deformated_value ); - msi_ui_actiondata( package, szRemoveIniValues, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); msi_free( deformated_key ); @@ -4849,7 +4814,7 @@ static UINT ITERATE_SelfRegModules(MSIRECORD *row, LPVOID param) uirow = MSI_CreateRecord( 2 ); MSI_RecordSetStringW( uirow, 1, file->File ); MSI_RecordSetStringW( uirow, 2, file->Component->Directory ); - msi_ui_actiondata( package, szSelfRegModules, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); return ERROR_SUCCESS; @@ -4899,7 +4864,7 @@ static UINT ITERATE_SelfUnregModules( MSIRECORD *row, LPVOID param ) uirow = MSI_CreateRecord( 2 ); MSI_RecordSetStringW( uirow, 1, file->File ); MSI_RecordSetStringW( uirow, 2, file->Component->Directory ); - msi_ui_actiondata( package, szSelfUnregModules, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); return ERROR_SUCCESS; @@ -5019,7 +4984,7 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package) /* the UI chunk */ uirow = MSI_CreateRecord( 1 ); MSI_RecordSetStringW( uirow, 1, feature->Feature ); - msi_ui_actiondata( package, szPublishFeatures, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); /* FIXME: call msi_ui_progress? */ } @@ -5056,7 +5021,7 @@ static UINT msi_unpublish_feature(MSIPACKAGE *package, MSIFEATURE *feature) uirow = MSI_CreateRecord( 1 ); MSI_RecordSetStringW( uirow, 1, feature->Feature ); - msi_ui_actiondata( package, szUnpublishFeatures, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); return ERROR_SUCCESS; @@ -5256,7 +5221,7 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package) done: uirow = MSI_CreateRecord( 1 ); MSI_RecordSetStringW( uirow, 1, package->ProductCode ); - msi_ui_actiondata( package, szRegisterProduct, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); RegCloseKey(hkey); @@ -5606,7 +5571,7 @@ static UINT ACTION_RegisterUser(MSIPACKAGE *package) end: uirow = MSI_CreateRecord( 1 ); MSI_RecordSetStringW( uirow, 1, productid ); - msi_ui_actiondata( package, szRegisterUser, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); msi_free(productid); @@ -5746,7 +5711,7 @@ end: uirow = MSI_CreateRecord( 2 ); MSI_RecordSetStringW( uirow, 1, compgroupid ); MSI_RecordSetStringW( uirow, 2, qualifier); - msi_ui_actiondata( package, szPublishComponents, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); /* FIXME: call ui_progress? */ @@ -5823,7 +5788,7 @@ static UINT ITERATE_UnpublishComponent( MSIRECORD *rec, LPVOID param ) uirow = MSI_CreateRecord( 2 ); MSI_RecordSetStringW( uirow, 1, compgroupid ); MSI_RecordSetStringW( uirow, 2, qualifier ); - msi_ui_actiondata( package, szUnpublishComponents, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); return ERROR_SUCCESS; @@ -6135,7 +6100,7 @@ done: uirow = MSI_CreateRecord( 2 ); MSI_RecordSetStringW( uirow, 1, display_name ); MSI_RecordSetStringW( uirow, 2, name ); - msi_ui_actiondata( package, szStartServices, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); if (service) CloseServiceHandle(service); @@ -6303,7 +6268,7 @@ done: uirow = MSI_CreateRecord( 2 ); MSI_RecordSetStringW( uirow, 1, display_name ); MSI_RecordSetStringW( uirow, 2, name ); - msi_ui_actiondata( package, szStopServices, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); msi_free( name ); @@ -6383,7 +6348,7 @@ done: uirow = MSI_CreateRecord( 2 ); MSI_RecordSetStringW( uirow, 1, display_name ); MSI_RecordSetStringW( uirow, 2, name ); - msi_ui_actiondata( package, szDeleteServices, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); if (service) CloseServiceHandle( service ); @@ -6501,7 +6466,7 @@ static UINT ITERATE_InstallODBCDriver( MSIRECORD *rec, LPVOID param ) MSI_RecordSetStringW( uirow, 1, desc ); MSI_RecordSetStringW( uirow, 2, MSI_RecordGetString(rec, 2) ); MSI_RecordSetStringW( uirow, 3, driver_file->Component->Directory ); - msi_ui_actiondata( package, szInstallODBC, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); msi_free(driver); @@ -6589,7 +6554,7 @@ static UINT ITERATE_InstallODBCTranslator( MSIRECORD *rec, LPVOID param ) MSI_RecordSetStringW( uirow, 1, desc ); MSI_RecordSetStringW( uirow, 2, MSI_RecordGetString(rec, 2) ); MSI_RecordSetStringW( uirow, 3, translator_file->Component->Directory ); - msi_ui_actiondata( package, szInstallODBC, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); msi_free(translator); @@ -6650,7 +6615,7 @@ static UINT ITERATE_InstallODBCDataSource( MSIRECORD *rec, LPVOID param ) MSI_RecordSetStringW( uirow, 1, desc ); MSI_RecordSetStringW( uirow, 2, MSI_RecordGetString(rec, 2) ); MSI_RecordSetInteger( uirow, 3, request ); - msi_ui_actiondata( package, szInstallODBC, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); msi_free(attrs); @@ -6732,7 +6697,7 @@ static UINT ITERATE_RemoveODBCDriver( MSIRECORD *rec, LPVOID param ) uirow = MSI_CreateRecord( 2 ); MSI_RecordSetStringW( uirow, 1, desc ); MSI_RecordSetStringW( uirow, 2, MSI_RecordGetString(rec, 2) ); - msi_ui_actiondata( package, szRemoveODBC, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); return ERROR_SUCCESS; @@ -6771,7 +6736,7 @@ static UINT ITERATE_RemoveODBCTranslator( MSIRECORD *rec, LPVOID param ) uirow = MSI_CreateRecord( 2 ); MSI_RecordSetStringW( uirow, 1, desc ); MSI_RecordSetStringW( uirow, 2, MSI_RecordGetString(rec, 2) ); - msi_ui_actiondata( package, szRemoveODBC, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); return ERROR_SUCCESS; @@ -6830,7 +6795,7 @@ static UINT ITERATE_RemoveODBCDataSource( MSIRECORD *rec, LPVOID param ) MSI_RecordSetStringW( uirow, 1, desc ); MSI_RecordSetStringW( uirow, 2, MSI_RecordGetString(rec, 2) ); MSI_RecordSetInteger( uirow, 3, request ); - msi_ui_actiondata( package, szRemoveODBC, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); return ERROR_SUCCESS; @@ -7178,7 +7143,7 @@ done: MSI_RecordSetStringW( uirow, 1, name ); MSI_RecordSetStringW( uirow, 2, newval ); MSI_RecordSetInteger( uirow, 3, action ); - msi_ui_actiondata( package, szWriteEnvironmentStrings, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); if (env) RegCloseKey(env); @@ -7321,7 +7286,7 @@ done: MSI_RecordSetStringW( uirow, 1, name ); MSI_RecordSetStringW( uirow, 2, value ); MSI_RecordSetInteger( uirow, 3, action ); - msi_ui_actiondata( package, szRemoveEnvironmentStrings, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); if (env) RegCloseKey( env ); @@ -7393,7 +7358,7 @@ static UINT ACTION_AllocateRegistrySpace( MSIPACKAGE *package ) uirow = MSI_CreateRecord( 1 ); MSI_RecordSetInteger( uirow, 1, space ); - msi_ui_actiondata( package, szAllocateRegistrySpace, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); return ERROR_SUCCESS; diff --git a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c index ae8c5c84bdb..bb492f464f4 100644 --- a/dlls/msi/appsearch.c +++ b/dlls/msi/appsearch.c @@ -1117,7 +1117,7 @@ static UINT iterate_appsearch(MSIRECORD *row, LPVOID param) uirow = MSI_CreateRecord( 2 ); MSI_RecordSetStringW( uirow, 1, propName ); MSI_RecordSetStringW( uirow, 2, sigName ); - msi_ui_actiondata( package, szAppSearch, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); return r; diff --git a/dlls/msi/assembly.c b/dlls/msi/assembly.c index 7151a8bd564..bccd114b493 100644 --- a/dlls/msi/assembly.c +++ b/dlls/msi/assembly.c @@ -707,7 +707,7 @@ UINT ACTION_MsiPublishAssemblies( MSIPACKAGE *package ) uirow = MSI_CreateRecord( 2 ); MSI_RecordSetStringW( uirow, 2, assembly->display_name ); - msi_ui_actiondata( package, szMsiPublishAssemblies, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); } return ERROR_SUCCESS; @@ -756,7 +756,7 @@ UINT ACTION_MsiUnpublishAssemblies( MSIPACKAGE *package ) uirow = MSI_CreateRecord( 2 ); MSI_RecordSetStringW( uirow, 2, assembly->display_name ); - msi_ui_actiondata( package, szMsiPublishAssemblies, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); } return ERROR_SUCCESS; diff --git a/dlls/msi/classes.c b/dlls/msi/classes.c index df5c81778ae..60cc3c1a4b0 100644 --- a/dlls/msi/classes.c +++ b/dlls/msi/classes.c @@ -902,7 +902,7 @@ UINT ACTION_RegisterClassInfo(MSIPACKAGE *package) uirow = MSI_CreateRecord(1); MSI_RecordSetStringW( uirow, 1, cls->clsid ); - msi_ui_actiondata( package, szRegisterClassInfo, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release(&uirow->hdr); } RegCloseKey(hkey); @@ -994,7 +994,7 @@ UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package ) uirow = MSI_CreateRecord( 1 ); MSI_RecordSetStringW( uirow, 1, cls->clsid ); - msi_ui_actiondata( package, szUnregisterClassInfo, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); } RegCloseKey( hkey ); @@ -1100,7 +1100,7 @@ UINT ACTION_RegisterProgIdInfo(MSIPACKAGE *package) uirow = MSI_CreateRecord( 1 ); MSI_RecordSetStringW( uirow, 1, progid->ProgID ); - msi_ui_actiondata( package, szRegisterProgIdInfo, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); } return ERROR_SUCCESS; @@ -1163,7 +1163,7 @@ UINT ACTION_UnregisterProgIdInfo( MSIPACKAGE *package ) uirow = MSI_CreateRecord( 1 ); MSI_RecordSetStringW( uirow, 1, progid->ProgID ); - msi_ui_actiondata( package, szUnregisterProgIdInfo, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); } return ERROR_SUCCESS; @@ -1350,7 +1350,7 @@ UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package) uirow = MSI_CreateRecord(1); MSI_RecordSetStringW( uirow, 1, ext->Extension ); - msi_ui_actiondata( package, szRegisterExtensionInfo, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release(&uirow->hdr); } return ERROR_SUCCESS; @@ -1433,7 +1433,7 @@ UINT ACTION_UnregisterExtensionInfo( MSIPACKAGE *package ) uirow = MSI_CreateRecord( 1 ); MSI_RecordSetStringW( uirow, 1, ext->Extension ); - msi_ui_actiondata( package, szUnregisterExtensionInfo, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); } return ERROR_SUCCESS; @@ -1488,7 +1488,7 @@ UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package) uirow = MSI_CreateRecord( 2 ); MSI_RecordSetStringW( uirow, 1, mt->ContentType ); MSI_RecordSetStringW( uirow, 2, mt->suffix ); - msi_ui_actiondata( package, szRegisterMIMEInfo, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); } return ERROR_SUCCESS; @@ -1532,7 +1532,7 @@ UINT ACTION_UnregisterMIMEInfo( MSIPACKAGE *package ) uirow = MSI_CreateRecord( 2 ); MSI_RecordSetStringW( uirow, 1, mime->ContentType ); MSI_RecordSetStringW( uirow, 2, mime->suffix ); - msi_ui_actiondata( package, szUnregisterMIMEInfo, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); } return ERROR_SUCCESS; diff --git a/dlls/msi/files.c b/dlls/msi/files.c index 9b467627cff..02ff8ec28c0 100644 --- a/dlls/msi/files.c +++ b/dlls/msi/files.c @@ -58,7 +58,7 @@ static void msi_file_update_ui( MSIPACKAGE *package, MSIFILE *f, const WCHAR *ac MSI_RecordSetStringW( uirow, 1, f->FileName ); MSI_RecordSetStringW( uirow, 9, f->Component->Directory ); MSI_RecordSetInteger( uirow, 6, f->FileSize ); - msi_ui_actiondata( package, action, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); msi_ui_progress( package, 2, f->FileSize, 0, 0 ); } @@ -980,7 +980,7 @@ done: MSI_RecordSetStringW( uirow, 1, MSI_RecordGetString(rec, 1) ); MSI_RecordSetInteger( uirow, 6, 1 ); /* FIXME */ MSI_RecordSetStringW( uirow, 9, destdir ); - msi_ui_actiondata( package, szMoveFiles, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); msi_free(sourcedir); @@ -1117,7 +1117,7 @@ static UINT ITERATE_DuplicateFiles(MSIRECORD *row, LPVOID param) MSI_RecordSetStringW( uirow, 1, MSI_RecordGetString( row, 1 ) ); MSI_RecordSetInteger( uirow, 6, file->FileSize ); MSI_RecordSetStringW( uirow, 9, MSI_RecordGetString( row, 5 ) ); - msi_ui_actiondata( package, szDuplicateFiles, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); msi_free(dest); @@ -1193,7 +1193,7 @@ static UINT ITERATE_RemoveDuplicateFiles( MSIRECORD *row, LPVOID param ) uirow = MSI_CreateRecord( 9 ); MSI_RecordSetStringW( uirow, 1, MSI_RecordGetString( row, 1 ) ); MSI_RecordSetStringW( uirow, 9, MSI_RecordGetString( row, 5 ) ); - msi_ui_actiondata( package, szRemoveDuplicateFiles, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); msi_free(dest); @@ -1315,7 +1315,7 @@ done: uirow = MSI_CreateRecord( 9 ); MSI_RecordSetStringW( uirow, 1, MSI_RecordGetString(row, 1) ); MSI_RecordSetStringW( uirow, 9, dir ); - msi_ui_actiondata( package, szRemoveFiles, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); msi_free(filename); @@ -1405,7 +1405,7 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package ) uirow = MSI_CreateRecord( 9 ); MSI_RecordSetStringW( uirow, 1, file->FileName ); MSI_RecordSetStringW( uirow, 9, comp->Directory ); - msi_ui_actiondata( package, szRemoveFiles, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); } diff --git a/dlls/msi/font.c b/dlls/msi/font.c index 25634512ab0..5c1e59d95e4 100644 --- a/dlls/msi/font.c +++ b/dlls/msi/font.c @@ -279,7 +279,7 @@ static UINT ITERATE_RegisterFonts(MSIRECORD *row, LPVOID param) if (p) p++; else p = uipath; MSI_RecordSetStringW( uirow, 1, p ); - msi_ui_actiondata( package, szRegisterFonts, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); msi_free( uipath ); /* FIXME: call msi_ui_progress? */ @@ -359,7 +359,7 @@ static UINT ITERATE_UnregisterFonts( MSIRECORD *row, LPVOID param ) if (p) p++; else p = uipath; MSI_RecordSetStringW( uirow, 1, p ); - msi_ui_actiondata( package, szUnregisterFonts, uirow ); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); msiobj_release( &uirow->hdr ); msi_free( uipath ); /* FIXME: call msi_ui_progress? */ diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index a3c3c0fabf7..71a08730084 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -1103,7 +1103,6 @@ extern DWORD call_script(MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR f /* User interface messages from the actions */ extern void msi_ui_progress(MSIPACKAGE *, int, int, int, int) DECLSPEC_HIDDEN; -extern void msi_ui_actiondata(MSIPACKAGE *, const WCHAR *, MSIRECORD *) DECLSPEC_HIDDEN; /* common strings */ static const WCHAR szSourceDir[] = {'S','o','u','r','c','e','D','i','r',0}; diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 325d212b714..f1d7eff2bc1 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -2010,6 +2010,7 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType, MSIREC msi_free(package->LastAction); msi_free(package->LastActionTemplate); package->LastAction = msi_dup_record_field(record, 1); + if (!package->LastAction) package->LastAction = strdupW(szEmpty); package->LastActionTemplate = msi_dup_record_field(record, 3); break; } diff --git a/dlls/msi/upgrade.c b/dlls/msi/upgrade.c index 369e8f58547..ac58d909e05 100644 --- a/dlls/msi/upgrade.c +++ b/dlls/msi/upgrade.c @@ -191,7 +191,7 @@ static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param) action_property = MSI_RecordGetString(rec, 7); append_productcode(package, action_property, productid); MSI_RecordSetStringW(uirow, 1, productid); - msi_ui_actiondata(package, szFindRelatedProducts, uirow); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); } index ++; }