Simplify the ProcessComponents action a little.

This commit is contained in:
Mike McCormack 2005-09-22 10:49:17 +00:00 committed by Alexandre Julliard
parent 680bf12aec
commit 566c69e7e4

View File

@ -2466,13 +2466,12 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
ui_progress(package,2,0,0,0); ui_progress(package,2,0,0,0);
if (comp->ComponentId) if (comp->ComponentId)
{ {
WCHAR *keypath = NULL;
MSIRECORD * uirow; MSIRECORD * uirow;
squash_guid(comp->ComponentId,squished_cc); squash_guid(comp->ComponentId,squished_cc);
keypath = resolve_keypath( package, comp ); msi_free(comp->FullKeypath);
comp->FullKeypath = keypath; comp->FullKeypath = resolve_keypath( package, comp );
/* do the refcounting */ /* do the refcounting */
ACTION_RefCountComponent( package, comp ); ACTION_RefCountComponent( package, comp );
@ -2493,9 +2492,9 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
if (rc != ERROR_SUCCESS) if (rc != ERROR_SUCCESS)
continue; continue;
if (keypath) if (comp->FullKeypath)
{ {
msi_reg_set_val_str( hkey2, squished_pc, keypath ); msi_reg_set_val_str( hkey2, squished_pc, comp->FullKeypath );
if (comp->Attributes & msidbComponentAttributesPermanent) if (comp->Attributes & msidbComponentAttributesPermanent)
{ {
@ -2504,7 +2503,7 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
'0','0','0','0','0','0','0','0','0','0','0','0', '0','0','0','0','0','0','0','0','0','0','0','0',
'0','0','0','0','0','0','0','0',0}; '0','0','0','0','0','0','0','0',0};
msi_reg_set_val_str( hkey2, szPermKey, keypath ); msi_reg_set_val_str( hkey2, szPermKey, comp->FullKeypath );
} }
RegCloseKey(hkey2); RegCloseKey(hkey2);
@ -2513,7 +2512,7 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
uirow = MSI_CreateRecord(3); uirow = MSI_CreateRecord(3);
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,keypath); MSI_RecordSetStringW(uirow,3,comp->FullKeypath);
ui_actiondata(package,szProcessComponents,uirow); ui_actiondata(package,szProcessComponents,uirow);
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
} }
@ -2788,11 +2787,8 @@ static UINT ITERATE_CreateShortcuts(MSIRECORD *row, LPVOID param)
} }
else else
{ {
LPWSTR keypath;
FIXME("poorly handled shortcut format, advertised shortcut\n"); FIXME("poorly handled shortcut format, advertised shortcut\n");
keypath = strdupW( comp->FullKeypath ); IShellLinkW_SetPath(sl,comp->FullKeypath);
IShellLinkW_SetPath(sl,keypath);
msi_free(keypath);
} }
if (!MSI_RecordIsNull(row,6)) if (!MSI_RecordIsNull(row,6))