msi: Use the given record for INSTALLMESSAGE_ACTIONDATA.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2017-07-07 09:03:15 -05:00 committed by Alexandre Julliard
parent c788ed858e
commit f9c68dfd92
9 changed files with 55 additions and 90 deletions

View File

@ -736,41 +736,6 @@ void msi_ui_progress( MSIPACKAGE *package, int a, int b, int c, int d )
msi_dialog_check_messages( NULL ); 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 ) INSTALLSTATE msi_get_component_action( MSIPACKAGE *package, MSICOMPONENT *comp )
{ {
if (!comp->Enabled) if (!comp->Enabled)
@ -825,7 +790,7 @@ static UINT ITERATE_CreateFolders(MSIRECORD *row, LPVOID param)
uirow = MSI_CreateRecord(1); uirow = MSI_CreateRecord(1);
MSI_RecordSetStringW(uirow, 1, dir); MSI_RecordSetStringW(uirow, 1, dir);
msi_ui_actiondata(package, szCreateFolders, uirow); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release(&uirow->hdr); msiobj_release(&uirow->hdr);
full_path = msi_get_target_folder( package, dir ); full_path = msi_get_target_folder( package, dir );
@ -913,7 +878,7 @@ static UINT ITERATE_RemoveFolders( MSIRECORD *row, LPVOID param )
uirow = MSI_CreateRecord( 1 ); uirow = MSI_CreateRecord( 1 );
MSI_RecordSetStringW( uirow, 1, dir ); MSI_RecordSetStringW( uirow, 1, dir );
msi_ui_actiondata( package, szRemoveFolders, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
folder = msi_get_loaded_folder( package, dir ); folder = msi_get_loaded_folder( package, dir );
@ -2974,7 +2939,7 @@ static UINT ITERATE_WriteRegistryValues(MSIRECORD *row, LPVOID param)
MSI_RecordSetStringW(uirow,1,uikey); MSI_RecordSetStringW(uirow,1,uikey);
if (type == REG_SZ || type == REG_EXPAND_SZ) if (type == REG_SZ || type == REG_EXPAND_SZ)
MSI_RecordSetStringW(uirow, 3, (LPWSTR)new_value); MSI_RecordSetStringW(uirow, 3, (LPWSTR)new_value);
msi_ui_actiondata( package, szWriteRegistryValues, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
msi_free(new_value); msi_free(new_value);
@ -3128,7 +3093,7 @@ static UINT ITERATE_RemoveRegistryValuesOnUninstall( MSIRECORD *row, LPVOID para
uirow = MSI_CreateRecord( 2 ); uirow = MSI_CreateRecord( 2 );
MSI_RecordSetStringW( uirow, 1, ui_key_str ); MSI_RecordSetStringW( uirow, 1, ui_key_str );
MSI_RecordSetStringW( uirow, 2, deformated_name ); MSI_RecordSetStringW( uirow, 2, deformated_name );
msi_ui_actiondata( package, szRemoveRegistryValues, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
msi_free( ui_key_str ); msi_free( ui_key_str );
@ -3191,7 +3156,7 @@ static UINT ITERATE_RemoveRegistryValuesOnInstall( MSIRECORD *row, LPVOID param
uirow = MSI_CreateRecord( 2 ); uirow = MSI_CreateRecord( 2 );
MSI_RecordSetStringW( uirow, 1, ui_key_str ); MSI_RecordSetStringW( uirow, 1, ui_key_str );
MSI_RecordSetStringW( uirow, 2, deformated_name ); MSI_RecordSetStringW( uirow, 2, deformated_name );
msi_ui_actiondata( package, szRemoveRegistryValues, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
msi_free( ui_key_str ); msi_free( ui_key_str );
@ -3650,7 +3615,7 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
MSI_RecordSetStringW(uirow,1,package->ProductCode); MSI_RecordSetStringW(uirow,1,package->ProductCode);
MSI_RecordSetStringW(uirow,2,comp->ComponentId); MSI_RecordSetStringW(uirow,2,comp->ComponentId);
MSI_RecordSetStringW(uirow,3,comp->FullKeypath); MSI_RecordSetStringW(uirow,3,comp->FullKeypath);
msi_ui_actiondata( package, szProcessComponents, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
} }
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -3744,7 +3709,7 @@ static UINT ITERATE_RegisterTypeLibraries(MSIRECORD *row, LPVOID param)
TRACE("component has no key path\n"); TRACE("component has no key path\n");
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
msi_ui_actiondata( package, szRegisterTypeLibraries, row ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, row);
module = LoadLibraryExW( file->TargetPath, NULL, LOAD_LIBRARY_AS_DATAFILE ); module = LoadLibraryExW( file->TargetPath, NULL, LOAD_LIBRARY_AS_DATAFILE );
if (module) 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)); TRACE("component not scheduled for removal %s\n", debugstr_w(component));
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
msi_ui_actiondata( package, szUnregisterTypeLibraries, row ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, row);
guid = MSI_RecordGetString( row, 1 ); guid = MSI_RecordGetString( row, 1 );
CLSIDFromString( guid, &libid ); 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)); TRACE("component not scheduled for installation %s\n", debugstr_w(component));
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
msi_ui_actiondata( package, szCreateShortcuts, row ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, row);
res = CoCreateInstance( &CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, res = CoCreateInstance( &CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
&IID_IShellLinkW, (LPVOID *) &sl ); &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)); TRACE("component not scheduled for removal %s\n", debugstr_w(component));
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
msi_ui_actiondata( package, szRemoveShortcuts, row ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, row);
link_file = get_link_file( package, row ); link_file = get_link_file( package, row );
@ -4511,7 +4476,7 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
end: end:
uirow = MSI_CreateRecord( 1 ); uirow = MSI_CreateRecord( 1 );
MSI_RecordSetStringW( uirow, 1, package->ProductCode ); MSI_RecordSetStringW( uirow, 1, package->ProductCode );
msi_ui_actiondata( package, szPublishProduct, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
RegCloseKey(hukey); RegCloseKey(hukey);
@ -4617,7 +4582,7 @@ static UINT ITERATE_WriteIniValues(MSIRECORD *row, LPVOID param)
MSI_RecordSetStringW(uirow,2,deformated_section); MSI_RecordSetStringW(uirow,2,deformated_section);
MSI_RecordSetStringW(uirow,3,deformated_key); MSI_RecordSetStringW(uirow,3,deformated_key);
MSI_RecordSetStringW(uirow,4,deformated_value); MSI_RecordSetStringW(uirow,4,deformated_value);
msi_ui_actiondata( package, szWriteIniValues, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
msi_free(fullname); msi_free(fullname);
@ -4697,7 +4662,7 @@ static UINT ITERATE_RemoveIniValuesOnUninstall( MSIRECORD *row, LPVOID param )
MSI_RecordSetStringW( uirow, 2, deformated_section ); MSI_RecordSetStringW( uirow, 2, deformated_section );
MSI_RecordSetStringW( uirow, 3, deformated_key ); MSI_RecordSetStringW( uirow, 3, deformated_key );
MSI_RecordSetStringW( uirow, 4, deformated_value ); MSI_RecordSetStringW( uirow, 4, deformated_value );
msi_ui_actiondata( package, szRemoveIniValues, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
msi_free( deformated_key ); 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, 2, deformated_section );
MSI_RecordSetStringW( uirow, 3, deformated_key ); MSI_RecordSetStringW( uirow, 3, deformated_key );
MSI_RecordSetStringW( uirow, 4, deformated_value ); MSI_RecordSetStringW( uirow, 4, deformated_value );
msi_ui_actiondata( package, szRemoveIniValues, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
msi_free( deformated_key ); msi_free( deformated_key );
@ -4849,7 +4814,7 @@ static UINT ITERATE_SelfRegModules(MSIRECORD *row, LPVOID param)
uirow = MSI_CreateRecord( 2 ); uirow = MSI_CreateRecord( 2 );
MSI_RecordSetStringW( uirow, 1, file->File ); MSI_RecordSetStringW( uirow, 1, file->File );
MSI_RecordSetStringW( uirow, 2, file->Component->Directory ); MSI_RecordSetStringW( uirow, 2, file->Component->Directory );
msi_ui_actiondata( package, szSelfRegModules, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -4899,7 +4864,7 @@ static UINT ITERATE_SelfUnregModules( MSIRECORD *row, LPVOID param )
uirow = MSI_CreateRecord( 2 ); uirow = MSI_CreateRecord( 2 );
MSI_RecordSetStringW( uirow, 1, file->File ); MSI_RecordSetStringW( uirow, 1, file->File );
MSI_RecordSetStringW( uirow, 2, file->Component->Directory ); MSI_RecordSetStringW( uirow, 2, file->Component->Directory );
msi_ui_actiondata( package, szSelfUnregModules, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -5019,7 +4984,7 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
/* the UI chunk */ /* the UI chunk */
uirow = MSI_CreateRecord( 1 ); uirow = MSI_CreateRecord( 1 );
MSI_RecordSetStringW( uirow, 1, feature->Feature ); MSI_RecordSetStringW( uirow, 1, feature->Feature );
msi_ui_actiondata( package, szPublishFeatures, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
/* FIXME: call msi_ui_progress? */ /* FIXME: call msi_ui_progress? */
} }
@ -5056,7 +5021,7 @@ static UINT msi_unpublish_feature(MSIPACKAGE *package, MSIFEATURE *feature)
uirow = MSI_CreateRecord( 1 ); uirow = MSI_CreateRecord( 1 );
MSI_RecordSetStringW( uirow, 1, feature->Feature ); MSI_RecordSetStringW( uirow, 1, feature->Feature );
msi_ui_actiondata( package, szUnpublishFeatures, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -5256,7 +5221,7 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
done: done:
uirow = MSI_CreateRecord( 1 ); uirow = MSI_CreateRecord( 1 );
MSI_RecordSetStringW( uirow, 1, package->ProductCode ); MSI_RecordSetStringW( uirow, 1, package->ProductCode );
msi_ui_actiondata( package, szRegisterProduct, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
RegCloseKey(hkey); RegCloseKey(hkey);
@ -5606,7 +5571,7 @@ static UINT ACTION_RegisterUser(MSIPACKAGE *package)
end: end:
uirow = MSI_CreateRecord( 1 ); uirow = MSI_CreateRecord( 1 );
MSI_RecordSetStringW( uirow, 1, productid ); MSI_RecordSetStringW( uirow, 1, productid );
msi_ui_actiondata( package, szRegisterUser, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
msi_free(productid); msi_free(productid);
@ -5746,7 +5711,7 @@ end:
uirow = MSI_CreateRecord( 2 ); uirow = MSI_CreateRecord( 2 );
MSI_RecordSetStringW( uirow, 1, compgroupid ); MSI_RecordSetStringW( uirow, 1, compgroupid );
MSI_RecordSetStringW( uirow, 2, qualifier); MSI_RecordSetStringW( uirow, 2, qualifier);
msi_ui_actiondata( package, szPublishComponents, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
/* FIXME: call ui_progress? */ /* FIXME: call ui_progress? */
@ -5823,7 +5788,7 @@ static UINT ITERATE_UnpublishComponent( MSIRECORD *rec, LPVOID param )
uirow = MSI_CreateRecord( 2 ); uirow = MSI_CreateRecord( 2 );
MSI_RecordSetStringW( uirow, 1, compgroupid ); MSI_RecordSetStringW( uirow, 1, compgroupid );
MSI_RecordSetStringW( uirow, 2, qualifier ); MSI_RecordSetStringW( uirow, 2, qualifier );
msi_ui_actiondata( package, szUnpublishComponents, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -6135,7 +6100,7 @@ done:
uirow = MSI_CreateRecord( 2 ); uirow = MSI_CreateRecord( 2 );
MSI_RecordSetStringW( uirow, 1, display_name ); MSI_RecordSetStringW( uirow, 1, display_name );
MSI_RecordSetStringW( uirow, 2, name ); MSI_RecordSetStringW( uirow, 2, name );
msi_ui_actiondata( package, szStartServices, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
if (service) CloseServiceHandle(service); if (service) CloseServiceHandle(service);
@ -6303,7 +6268,7 @@ done:
uirow = MSI_CreateRecord( 2 ); uirow = MSI_CreateRecord( 2 );
MSI_RecordSetStringW( uirow, 1, display_name ); MSI_RecordSetStringW( uirow, 1, display_name );
MSI_RecordSetStringW( uirow, 2, name ); MSI_RecordSetStringW( uirow, 2, name );
msi_ui_actiondata( package, szStopServices, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
msi_free( name ); msi_free( name );
@ -6383,7 +6348,7 @@ done:
uirow = MSI_CreateRecord( 2 ); uirow = MSI_CreateRecord( 2 );
MSI_RecordSetStringW( uirow, 1, display_name ); MSI_RecordSetStringW( uirow, 1, display_name );
MSI_RecordSetStringW( uirow, 2, name ); MSI_RecordSetStringW( uirow, 2, name );
msi_ui_actiondata( package, szDeleteServices, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
if (service) CloseServiceHandle( service ); if (service) CloseServiceHandle( service );
@ -6501,7 +6466,7 @@ static UINT ITERATE_InstallODBCDriver( MSIRECORD *rec, LPVOID param )
MSI_RecordSetStringW( uirow, 1, desc ); MSI_RecordSetStringW( uirow, 1, desc );
MSI_RecordSetStringW( uirow, 2, MSI_RecordGetString(rec, 2) ); MSI_RecordSetStringW( uirow, 2, MSI_RecordGetString(rec, 2) );
MSI_RecordSetStringW( uirow, 3, driver_file->Component->Directory ); MSI_RecordSetStringW( uirow, 3, driver_file->Component->Directory );
msi_ui_actiondata( package, szInstallODBC, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
msi_free(driver); msi_free(driver);
@ -6589,7 +6554,7 @@ static UINT ITERATE_InstallODBCTranslator( MSIRECORD *rec, LPVOID param )
MSI_RecordSetStringW( uirow, 1, desc ); MSI_RecordSetStringW( uirow, 1, desc );
MSI_RecordSetStringW( uirow, 2, MSI_RecordGetString(rec, 2) ); MSI_RecordSetStringW( uirow, 2, MSI_RecordGetString(rec, 2) );
MSI_RecordSetStringW( uirow, 3, translator_file->Component->Directory ); MSI_RecordSetStringW( uirow, 3, translator_file->Component->Directory );
msi_ui_actiondata( package, szInstallODBC, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
msi_free(translator); msi_free(translator);
@ -6650,7 +6615,7 @@ static UINT ITERATE_InstallODBCDataSource( MSIRECORD *rec, LPVOID param )
MSI_RecordSetStringW( uirow, 1, desc ); MSI_RecordSetStringW( uirow, 1, desc );
MSI_RecordSetStringW( uirow, 2, MSI_RecordGetString(rec, 2) ); MSI_RecordSetStringW( uirow, 2, MSI_RecordGetString(rec, 2) );
MSI_RecordSetInteger( uirow, 3, request ); MSI_RecordSetInteger( uirow, 3, request );
msi_ui_actiondata( package, szInstallODBC, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
msi_free(attrs); msi_free(attrs);
@ -6732,7 +6697,7 @@ static UINT ITERATE_RemoveODBCDriver( MSIRECORD *rec, LPVOID param )
uirow = MSI_CreateRecord( 2 ); uirow = MSI_CreateRecord( 2 );
MSI_RecordSetStringW( uirow, 1, desc ); MSI_RecordSetStringW( uirow, 1, desc );
MSI_RecordSetStringW( uirow, 2, MSI_RecordGetString(rec, 2) ); MSI_RecordSetStringW( uirow, 2, MSI_RecordGetString(rec, 2) );
msi_ui_actiondata( package, szRemoveODBC, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -6771,7 +6736,7 @@ static UINT ITERATE_RemoveODBCTranslator( MSIRECORD *rec, LPVOID param )
uirow = MSI_CreateRecord( 2 ); uirow = MSI_CreateRecord( 2 );
MSI_RecordSetStringW( uirow, 1, desc ); MSI_RecordSetStringW( uirow, 1, desc );
MSI_RecordSetStringW( uirow, 2, MSI_RecordGetString(rec, 2) ); MSI_RecordSetStringW( uirow, 2, MSI_RecordGetString(rec, 2) );
msi_ui_actiondata( package, szRemoveODBC, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -6830,7 +6795,7 @@ static UINT ITERATE_RemoveODBCDataSource( MSIRECORD *rec, LPVOID param )
MSI_RecordSetStringW( uirow, 1, desc ); MSI_RecordSetStringW( uirow, 1, desc );
MSI_RecordSetStringW( uirow, 2, MSI_RecordGetString(rec, 2) ); MSI_RecordSetStringW( uirow, 2, MSI_RecordGetString(rec, 2) );
MSI_RecordSetInteger( uirow, 3, request ); MSI_RecordSetInteger( uirow, 3, request );
msi_ui_actiondata( package, szRemoveODBC, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -7178,7 +7143,7 @@ done:
MSI_RecordSetStringW( uirow, 1, name ); MSI_RecordSetStringW( uirow, 1, name );
MSI_RecordSetStringW( uirow, 2, newval ); MSI_RecordSetStringW( uirow, 2, newval );
MSI_RecordSetInteger( uirow, 3, action ); MSI_RecordSetInteger( uirow, 3, action );
msi_ui_actiondata( package, szWriteEnvironmentStrings, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
if (env) RegCloseKey(env); if (env) RegCloseKey(env);
@ -7321,7 +7286,7 @@ done:
MSI_RecordSetStringW( uirow, 1, name ); MSI_RecordSetStringW( uirow, 1, name );
MSI_RecordSetStringW( uirow, 2, value ); MSI_RecordSetStringW( uirow, 2, value );
MSI_RecordSetInteger( uirow, 3, action ); MSI_RecordSetInteger( uirow, 3, action );
msi_ui_actiondata( package, szRemoveEnvironmentStrings, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
if (env) RegCloseKey( env ); if (env) RegCloseKey( env );
@ -7393,7 +7358,7 @@ static UINT ACTION_AllocateRegistrySpace( MSIPACKAGE *package )
uirow = MSI_CreateRecord( 1 ); uirow = MSI_CreateRecord( 1 );
MSI_RecordSetInteger( uirow, 1, space ); MSI_RecordSetInteger( uirow, 1, space );
msi_ui_actiondata( package, szAllocateRegistrySpace, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
return ERROR_SUCCESS; return ERROR_SUCCESS;

View File

@ -1117,7 +1117,7 @@ static UINT iterate_appsearch(MSIRECORD *row, LPVOID param)
uirow = MSI_CreateRecord( 2 ); uirow = MSI_CreateRecord( 2 );
MSI_RecordSetStringW( uirow, 1, propName ); MSI_RecordSetStringW( uirow, 1, propName );
MSI_RecordSetStringW( uirow, 2, sigName ); MSI_RecordSetStringW( uirow, 2, sigName );
msi_ui_actiondata( package, szAppSearch, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
return r; return r;

View File

@ -707,7 +707,7 @@ UINT ACTION_MsiPublishAssemblies( MSIPACKAGE *package )
uirow = MSI_CreateRecord( 2 ); uirow = MSI_CreateRecord( 2 );
MSI_RecordSetStringW( uirow, 2, assembly->display_name ); MSI_RecordSetStringW( uirow, 2, assembly->display_name );
msi_ui_actiondata( package, szMsiPublishAssemblies, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
} }
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -756,7 +756,7 @@ UINT ACTION_MsiUnpublishAssemblies( MSIPACKAGE *package )
uirow = MSI_CreateRecord( 2 ); uirow = MSI_CreateRecord( 2 );
MSI_RecordSetStringW( uirow, 2, assembly->display_name ); MSI_RecordSetStringW( uirow, 2, assembly->display_name );
msi_ui_actiondata( package, szMsiPublishAssemblies, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
} }
return ERROR_SUCCESS; return ERROR_SUCCESS;

View File

@ -902,7 +902,7 @@ UINT ACTION_RegisterClassInfo(MSIPACKAGE *package)
uirow = MSI_CreateRecord(1); uirow = MSI_CreateRecord(1);
MSI_RecordSetStringW( uirow, 1, cls->clsid ); MSI_RecordSetStringW( uirow, 1, cls->clsid );
msi_ui_actiondata( package, szRegisterClassInfo, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release(&uirow->hdr); msiobj_release(&uirow->hdr);
} }
RegCloseKey(hkey); RegCloseKey(hkey);
@ -994,7 +994,7 @@ UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package )
uirow = MSI_CreateRecord( 1 ); uirow = MSI_CreateRecord( 1 );
MSI_RecordSetStringW( uirow, 1, cls->clsid ); MSI_RecordSetStringW( uirow, 1, cls->clsid );
msi_ui_actiondata( package, szUnregisterClassInfo, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
} }
RegCloseKey( hkey ); RegCloseKey( hkey );
@ -1100,7 +1100,7 @@ UINT ACTION_RegisterProgIdInfo(MSIPACKAGE *package)
uirow = MSI_CreateRecord( 1 ); uirow = MSI_CreateRecord( 1 );
MSI_RecordSetStringW( uirow, 1, progid->ProgID ); MSI_RecordSetStringW( uirow, 1, progid->ProgID );
msi_ui_actiondata( package, szRegisterProgIdInfo, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
} }
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -1163,7 +1163,7 @@ UINT ACTION_UnregisterProgIdInfo( MSIPACKAGE *package )
uirow = MSI_CreateRecord( 1 ); uirow = MSI_CreateRecord( 1 );
MSI_RecordSetStringW( uirow, 1, progid->ProgID ); MSI_RecordSetStringW( uirow, 1, progid->ProgID );
msi_ui_actiondata( package, szUnregisterProgIdInfo, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
} }
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -1350,7 +1350,7 @@ UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package)
uirow = MSI_CreateRecord(1); uirow = MSI_CreateRecord(1);
MSI_RecordSetStringW( uirow, 1, ext->Extension ); MSI_RecordSetStringW( uirow, 1, ext->Extension );
msi_ui_actiondata( package, szRegisterExtensionInfo, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release(&uirow->hdr); msiobj_release(&uirow->hdr);
} }
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -1433,7 +1433,7 @@ UINT ACTION_UnregisterExtensionInfo( MSIPACKAGE *package )
uirow = MSI_CreateRecord( 1 ); uirow = MSI_CreateRecord( 1 );
MSI_RecordSetStringW( uirow, 1, ext->Extension ); MSI_RecordSetStringW( uirow, 1, ext->Extension );
msi_ui_actiondata( package, szUnregisterExtensionInfo, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
} }
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -1488,7 +1488,7 @@ UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package)
uirow = MSI_CreateRecord( 2 ); uirow = MSI_CreateRecord( 2 );
MSI_RecordSetStringW( uirow, 1, mt->ContentType ); MSI_RecordSetStringW( uirow, 1, mt->ContentType );
MSI_RecordSetStringW( uirow, 2, mt->suffix ); MSI_RecordSetStringW( uirow, 2, mt->suffix );
msi_ui_actiondata( package, szRegisterMIMEInfo, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
} }
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -1532,7 +1532,7 @@ UINT ACTION_UnregisterMIMEInfo( MSIPACKAGE *package )
uirow = MSI_CreateRecord( 2 ); uirow = MSI_CreateRecord( 2 );
MSI_RecordSetStringW( uirow, 1, mime->ContentType ); MSI_RecordSetStringW( uirow, 1, mime->ContentType );
MSI_RecordSetStringW( uirow, 2, mime->suffix ); MSI_RecordSetStringW( uirow, 2, mime->suffix );
msi_ui_actiondata( package, szUnregisterMIMEInfo, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
} }
return ERROR_SUCCESS; return ERROR_SUCCESS;

View File

@ -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, 1, f->FileName );
MSI_RecordSetStringW( uirow, 9, f->Component->Directory ); MSI_RecordSetStringW( uirow, 9, f->Component->Directory );
MSI_RecordSetInteger( uirow, 6, f->FileSize ); MSI_RecordSetInteger( uirow, 6, f->FileSize );
msi_ui_actiondata( package, action, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
msi_ui_progress( package, 2, f->FileSize, 0, 0 ); msi_ui_progress( package, 2, f->FileSize, 0, 0 );
} }
@ -980,7 +980,7 @@ done:
MSI_RecordSetStringW( uirow, 1, MSI_RecordGetString(rec, 1) ); MSI_RecordSetStringW( uirow, 1, MSI_RecordGetString(rec, 1) );
MSI_RecordSetInteger( uirow, 6, 1 ); /* FIXME */ MSI_RecordSetInteger( uirow, 6, 1 ); /* FIXME */
MSI_RecordSetStringW( uirow, 9, destdir ); MSI_RecordSetStringW( uirow, 9, destdir );
msi_ui_actiondata( package, szMoveFiles, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
msi_free(sourcedir); msi_free(sourcedir);
@ -1117,7 +1117,7 @@ static UINT ITERATE_DuplicateFiles(MSIRECORD *row, LPVOID param)
MSI_RecordSetStringW( uirow, 1, MSI_RecordGetString( row, 1 ) ); MSI_RecordSetStringW( uirow, 1, MSI_RecordGetString( row, 1 ) );
MSI_RecordSetInteger( uirow, 6, file->FileSize ); MSI_RecordSetInteger( uirow, 6, file->FileSize );
MSI_RecordSetStringW( uirow, 9, MSI_RecordGetString( row, 5 ) ); MSI_RecordSetStringW( uirow, 9, MSI_RecordGetString( row, 5 ) );
msi_ui_actiondata( package, szDuplicateFiles, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
msi_free(dest); msi_free(dest);
@ -1193,7 +1193,7 @@ static UINT ITERATE_RemoveDuplicateFiles( MSIRECORD *row, LPVOID param )
uirow = MSI_CreateRecord( 9 ); uirow = MSI_CreateRecord( 9 );
MSI_RecordSetStringW( uirow, 1, MSI_RecordGetString( row, 1 ) ); MSI_RecordSetStringW( uirow, 1, MSI_RecordGetString( row, 1 ) );
MSI_RecordSetStringW( uirow, 9, MSI_RecordGetString( row, 5 ) ); MSI_RecordSetStringW( uirow, 9, MSI_RecordGetString( row, 5 ) );
msi_ui_actiondata( package, szRemoveDuplicateFiles, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
msi_free(dest); msi_free(dest);
@ -1315,7 +1315,7 @@ done:
uirow = MSI_CreateRecord( 9 ); uirow = MSI_CreateRecord( 9 );
MSI_RecordSetStringW( uirow, 1, MSI_RecordGetString(row, 1) ); MSI_RecordSetStringW( uirow, 1, MSI_RecordGetString(row, 1) );
MSI_RecordSetStringW( uirow, 9, dir ); MSI_RecordSetStringW( uirow, 9, dir );
msi_ui_actiondata( package, szRemoveFiles, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
msi_free(filename); msi_free(filename);
@ -1405,7 +1405,7 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
uirow = MSI_CreateRecord( 9 ); uirow = MSI_CreateRecord( 9 );
MSI_RecordSetStringW( uirow, 1, file->FileName ); MSI_RecordSetStringW( uirow, 1, file->FileName );
MSI_RecordSetStringW( uirow, 9, comp->Directory ); MSI_RecordSetStringW( uirow, 9, comp->Directory );
msi_ui_actiondata( package, szRemoveFiles, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
} }

View File

@ -279,7 +279,7 @@ static UINT ITERATE_RegisterFonts(MSIRECORD *row, LPVOID param)
if (p) p++; if (p) p++;
else p = uipath; else p = uipath;
MSI_RecordSetStringW( uirow, 1, p ); MSI_RecordSetStringW( uirow, 1, p );
msi_ui_actiondata( package, szRegisterFonts, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
msi_free( uipath ); msi_free( uipath );
/* FIXME: call msi_ui_progress? */ /* FIXME: call msi_ui_progress? */
@ -359,7 +359,7 @@ static UINT ITERATE_UnregisterFonts( MSIRECORD *row, LPVOID param )
if (p) p++; if (p) p++;
else p = uipath; else p = uipath;
MSI_RecordSetStringW( uirow, 1, p ); MSI_RecordSetStringW( uirow, 1, p );
msi_ui_actiondata( package, szUnregisterFonts, uirow ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
msi_free( uipath ); msi_free( uipath );
/* FIXME: call msi_ui_progress? */ /* FIXME: call msi_ui_progress? */

View File

@ -1103,7 +1103,6 @@ extern DWORD call_script(MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR f
/* User interface messages from the actions */ /* User interface messages from the actions */
extern void msi_ui_progress(MSIPACKAGE *, int, int, int, int) DECLSPEC_HIDDEN; 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 */ /* common strings */
static const WCHAR szSourceDir[] = {'S','o','u','r','c','e','D','i','r',0}; static const WCHAR szSourceDir[] = {'S','o','u','r','c','e','D','i','r',0};

View File

@ -2010,6 +2010,7 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType, MSIREC
msi_free(package->LastAction); msi_free(package->LastAction);
msi_free(package->LastActionTemplate); msi_free(package->LastActionTemplate);
package->LastAction = msi_dup_record_field(record, 1); package->LastAction = msi_dup_record_field(record, 1);
if (!package->LastAction) package->LastAction = strdupW(szEmpty);
package->LastActionTemplate = msi_dup_record_field(record, 3); package->LastActionTemplate = msi_dup_record_field(record, 3);
break; break;
} }

View File

@ -191,7 +191,7 @@ static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param)
action_property = MSI_RecordGetString(rec, 7); action_property = MSI_RecordGetString(rec, 7);
append_productcode(package, action_property, productid); append_productcode(package, action_property, productid);
MSI_RecordSetStringW(uirow, 1, productid); MSI_RecordSetStringW(uirow, 1, productid);
msi_ui_actiondata(package, szFindRelatedProducts, uirow); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow);
} }
index ++; index ++;
} }