First pass at writing out CurVer keys for ProgIds. Also print a

message for the actions we skip. Lines up with native MSI output logs
for ease of comparison.
This commit is contained in:
Aric Stewart 2005-05-26 16:08:58 +00:00 committed by Alexandre Julliard
parent 254e747b72
commit 3594e45ab6
2 changed files with 40 additions and 9 deletions

View File

@ -1334,6 +1334,16 @@ static UINT ACTION_ProcessUISequence(MSIPACKAGE *package)
break;
}
sz=0x100;
rc = MSI_RecordGetStringW(row,1,buffer,&sz);
if (rc != ERROR_SUCCESS)
{
ERR("Error is %x\n",rc);
msiobj_release(&row->hdr);
break;
}
/* check conditions */
if (!MSI_RecordIsNull(row,2))
{
@ -1348,6 +1358,8 @@ static UINT ACTION_ProcessUISequence(MSIPACKAGE *package)
{
HeapFree(GetProcessHeap(),0,cond);
msiobj_release(&row->hdr);
TRACE("Skipping action: %s (condition is false)\n",
debugstr_w(buffer));
continue;
}
else
@ -1355,15 +1367,6 @@ static UINT ACTION_ProcessUISequence(MSIPACKAGE *package)
}
}
sz=0x100;
rc = MSI_RecordGetStringW(row,1,buffer,&sz);
if (rc != ERROR_SUCCESS)
{
ERR("Error is %x\n",rc);
msiobj_release(&row->hdr);
break;
}
rc = ACTION_PerformUIAction(package,buffer);
if (rc == ERROR_FUNCTION_NOT_CALLED)
@ -4602,6 +4605,20 @@ static INT load_progid(MSIPACKAGE* package, MSIRECORD *row)
HeapFree(GetProcessHeap(),0,buffer);
}
package->progids[index].CurVerIndex = -1;
/* if we have a parent then we may be that parents CurVer */
if (package->progids[index].ParentIndex >= 0)
{
int pindex = package->progids[index].ParentIndex;
while (package->progids[pindex].ParentIndex>= 0)
pindex = package->progids[pindex].ParentIndex;
FIXME("BAD BAD need to determing if we are really the CurVer\n");
package->progids[index].CurVerIndex = pindex;
}
return index;
}
@ -5655,6 +5672,8 @@ static UINT register_progid(MSIPACKAGE *package, MSIPROGID* progid,
static const WCHAR szCLSID[] = { 'C','L','S','I','D',0 };
static const WCHAR szDefaultIcon[] =
{'D','e','f','a','u','l','t','I','c','o','n',0};
static const WCHAR szCurVer[] =
{'C','u','r','V','e','r',0};
/* check if already registered */
RegCreateKeyExW(HKEY_CLASSES_ROOT, progid->ProgID, 0, NULL, 0,
@ -5694,6 +5713,17 @@ static UINT register_progid(MSIPACKAGE *package, MSIPROGID* progid,
RegCloseKey(hkey2);
}
/* write out the current version */
if (progid->CurVerIndex >= 0)
{
RegCreateKeyW(hkey,szCurVer,&hkey2);
RegSetValueExW(hkey2,NULL,0,REG_SZ,
(LPVOID)package->progids[progid->CurVerIndex].ProgID,
(strlenW(package->progids[progid->CurVerIndex].ProgID)+1) *
sizeof(WCHAR));
RegCloseKey(hkey2);
}
RegCloseKey(hkey);
}
return rc;

View File

@ -146,6 +146,7 @@ typedef struct tagMSIPROGID
LPWSTR IconPath;
/* not in the table, set during instalation */
BOOL InstallMe;
INT CurVerIndex;
} MSIPROGID;
typedef struct tagMSIVERB