msi: Remove some unnecessary indent.
This commit is contained in:
parent
0b9960a1f9
commit
fe8cd38812
@ -2557,92 +2557,91 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
|
|||||||
|
|
||||||
rc = MSIREG_OpenComponents(&hkey);
|
rc = MSIREG_OpenComponents(&hkey);
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
goto end;
|
return rc;
|
||||||
|
|
||||||
squash_guid(package->ProductCode,squished_pc);
|
squash_guid(package->ProductCode,squished_pc);
|
||||||
ui_progress(package,1,COMPONENT_PROGRESS_VALUE,1,0);
|
ui_progress(package,1,COMPONENT_PROGRESS_VALUE,1,0);
|
||||||
|
|
||||||
LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
|
LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
|
||||||
{
|
{
|
||||||
|
MSIRECORD * uirow;
|
||||||
|
|
||||||
ui_progress(package,2,0,0,0);
|
ui_progress(package,2,0,0,0);
|
||||||
if (comp->ComponentId)
|
if (!comp->ComponentId)
|
||||||
{
|
continue;
|
||||||
MSIRECORD * uirow;
|
|
||||||
|
|
||||||
squash_guid(comp->ComponentId,squished_cc);
|
squash_guid(comp->ComponentId,squished_cc);
|
||||||
|
|
||||||
msi_free(comp->FullKeypath);
|
msi_free(comp->FullKeypath);
|
||||||
comp->FullKeypath = resolve_keypath( package, comp );
|
comp->FullKeypath = resolve_keypath( package, comp );
|
||||||
|
|
||||||
/* do the refcounting */
|
/* do the refcounting */
|
||||||
ACTION_RefCountComponent( package, comp );
|
ACTION_RefCountComponent( package, comp );
|
||||||
|
|
||||||
TRACE("Component %s (%s), Keypath=%s, RefCount=%i\n",
|
TRACE("Component %s (%s), Keypath=%s, RefCount=%i\n",
|
||||||
debugstr_w(comp->Component),
|
debugstr_w(comp->Component),
|
||||||
debugstr_w(squished_cc),
|
debugstr_w(squished_cc),
|
||||||
debugstr_w(comp->FullKeypath),
|
debugstr_w(comp->FullKeypath),
|
||||||
comp->RefCount);
|
comp->RefCount);
|
||||||
/*
|
/*
|
||||||
* Write the keypath out if the component is to be registered
|
* Write the keypath out if the component is to be registered
|
||||||
* and delete the key if the component is to be deregistered
|
* and delete the key if the component is to be deregistered
|
||||||
*/
|
*/
|
||||||
if (ACTION_VerifyComponentForAction( comp, INSTALLSTATE_LOCAL))
|
if (ACTION_VerifyComponentForAction( comp, INSTALLSTATE_LOCAL))
|
||||||
|
{
|
||||||
|
rc = RegCreateKeyW(hkey,squished_cc,&hkey2);
|
||||||
|
if (rc != ERROR_SUCCESS)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (!comp->FullKeypath)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
msi_reg_set_val_str( hkey2, squished_pc, comp->FullKeypath );
|
||||||
|
|
||||||
|
if (comp->Attributes & msidbComponentAttributesPermanent)
|
||||||
{
|
{
|
||||||
rc = RegCreateKeyW(hkey,squished_cc,&hkey2);
|
static const WCHAR szPermKey[] =
|
||||||
if (rc != ERROR_SUCCESS)
|
{ '0','0','0','0','0','0','0','0','0','0','0','0',
|
||||||
continue;
|
'0','0','0','0','0','0','0','0','0','0','0','0',
|
||||||
|
'0','0','0','0','0','0','0','0',0 };
|
||||||
|
|
||||||
if (comp->FullKeypath)
|
msi_reg_set_val_str( hkey2, szPermKey, comp->FullKeypath );
|
||||||
{
|
|
||||||
msi_reg_set_val_str( hkey2, squished_pc, comp->FullKeypath );
|
|
||||||
|
|
||||||
if (comp->Attributes & msidbComponentAttributesPermanent)
|
|
||||||
{
|
|
||||||
static const WCHAR szPermKey[] =
|
|
||||||
{ '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, comp->FullKeypath );
|
|
||||||
}
|
|
||||||
|
|
||||||
RegCloseKey(hkey2);
|
|
||||||
|
|
||||||
/* UI stuff */
|
|
||||||
uirow = MSI_CreateRecord(3);
|
|
||||||
MSI_RecordSetStringW(uirow,1,package->ProductCode);
|
|
||||||
MSI_RecordSetStringW(uirow,2,comp->ComponentId);
|
|
||||||
MSI_RecordSetStringW(uirow,3,comp->FullKeypath);
|
|
||||||
ui_actiondata(package,szProcessComponents,uirow);
|
|
||||||
msiobj_release( &uirow->hdr );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (ACTION_VerifyComponentForAction( comp, INSTALLSTATE_ABSENT))
|
|
||||||
{
|
|
||||||
DWORD res;
|
|
||||||
|
|
||||||
rc = RegOpenKeyW(hkey,squished_cc,&hkey2);
|
RegCloseKey(hkey2);
|
||||||
if (rc != ERROR_SUCCESS)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
RegDeleteValueW(hkey2,squished_pc);
|
/* UI stuff */
|
||||||
|
uirow = MSI_CreateRecord(3);
|
||||||
|
MSI_RecordSetStringW(uirow,1,package->ProductCode);
|
||||||
|
MSI_RecordSetStringW(uirow,2,comp->ComponentId);
|
||||||
|
MSI_RecordSetStringW(uirow,3,comp->FullKeypath);
|
||||||
|
ui_actiondata(package,szProcessComponents,uirow);
|
||||||
|
msiobj_release( &uirow->hdr );
|
||||||
|
}
|
||||||
|
else if (ACTION_VerifyComponentForAction( comp, INSTALLSTATE_ABSENT))
|
||||||
|
{
|
||||||
|
DWORD res;
|
||||||
|
|
||||||
/* if the key is empty delete it */
|
rc = RegOpenKeyW(hkey,squished_cc,&hkey2);
|
||||||
res = RegEnumKeyExW(hkey2,0,NULL,0,0,NULL,0,NULL);
|
if (rc != ERROR_SUCCESS)
|
||||||
RegCloseKey(hkey2);
|
continue;
|
||||||
if (res == ERROR_NO_MORE_ITEMS)
|
|
||||||
RegDeleteKeyW(hkey,squished_cc);
|
RegDeleteValueW(hkey2,squished_pc);
|
||||||
|
|
||||||
/* UI stuff */
|
/* if the key is empty delete it */
|
||||||
uirow = MSI_CreateRecord(2);
|
res = RegEnumKeyExW(hkey2,0,NULL,0,0,NULL,0,NULL);
|
||||||
MSI_RecordSetStringW(uirow,1,package->ProductCode);
|
RegCloseKey(hkey2);
|
||||||
MSI_RecordSetStringW(uirow,2,comp->ComponentId);
|
if (res == ERROR_NO_MORE_ITEMS)
|
||||||
ui_actiondata(package,szProcessComponents,uirow);
|
RegDeleteKeyW(hkey,squished_cc);
|
||||||
msiobj_release( &uirow->hdr );
|
|
||||||
}
|
/* UI stuff */
|
||||||
|
uirow = MSI_CreateRecord(2);
|
||||||
|
MSI_RecordSetStringW(uirow,1,package->ProductCode);
|
||||||
|
MSI_RecordSetStringW(uirow,2,comp->ComponentId);
|
||||||
|
ui_actiondata(package,szProcessComponents,uirow);
|
||||||
|
msiobj_release( &uirow->hdr );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end:
|
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user