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:
parent
254e747b72
commit
3594e45ab6
|
@ -1334,6 +1334,16 @@ static UINT ACTION_ProcessUISequence(MSIPACKAGE *package)
|
||||||
break;
|
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 */
|
/* check conditions */
|
||||||
if (!MSI_RecordIsNull(row,2))
|
if (!MSI_RecordIsNull(row,2))
|
||||||
{
|
{
|
||||||
|
@ -1348,6 +1358,8 @@ static UINT ACTION_ProcessUISequence(MSIPACKAGE *package)
|
||||||
{
|
{
|
||||||
HeapFree(GetProcessHeap(),0,cond);
|
HeapFree(GetProcessHeap(),0,cond);
|
||||||
msiobj_release(&row->hdr);
|
msiobj_release(&row->hdr);
|
||||||
|
TRACE("Skipping action: %s (condition is false)\n",
|
||||||
|
debugstr_w(buffer));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else
|
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);
|
rc = ACTION_PerformUIAction(package,buffer);
|
||||||
|
|
||||||
if (rc == ERROR_FUNCTION_NOT_CALLED)
|
if (rc == ERROR_FUNCTION_NOT_CALLED)
|
||||||
|
@ -4602,6 +4605,20 @@ static INT load_progid(MSIPACKAGE* package, MSIRECORD *row)
|
||||||
HeapFree(GetProcessHeap(),0,buffer);
|
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;
|
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 szCLSID[] = { 'C','L','S','I','D',0 };
|
||||||
static const WCHAR szDefaultIcon[] =
|
static const WCHAR szDefaultIcon[] =
|
||||||
{'D','e','f','a','u','l','t','I','c','o','n',0};
|
{'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 */
|
/* check if already registered */
|
||||||
RegCreateKeyExW(HKEY_CLASSES_ROOT, progid->ProgID, 0, NULL, 0,
|
RegCreateKeyExW(HKEY_CLASSES_ROOT, progid->ProgID, 0, NULL, 0,
|
||||||
|
@ -5694,6 +5713,17 @@ static UINT register_progid(MSIPACKAGE *package, MSIPROGID* progid,
|
||||||
RegCloseKey(hkey2);
|
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);
|
RegCloseKey(hkey);
|
||||||
}
|
}
|
||||||
return rc;
|
return rc;
|
||||||
|
|
|
@ -146,6 +146,7 @@ typedef struct tagMSIPROGID
|
||||||
LPWSTR IconPath;
|
LPWSTR IconPath;
|
||||||
/* not in the table, set during instalation */
|
/* not in the table, set during instalation */
|
||||||
BOOL InstallMe;
|
BOOL InstallMe;
|
||||||
|
INT CurVerIndex;
|
||||||
} MSIPROGID;
|
} MSIPROGID;
|
||||||
|
|
||||||
typedef struct tagMSIVERB
|
typedef struct tagMSIVERB
|
||||||
|
|
Loading…
Reference in New Issue