Add install_on_demand for Extension servers also. currently defaulting

to TRUE.
Extension need to have 1 verb to mark the given progid to be
installed.
This commit is contained in:
Aric Stewart 2005-06-03 11:24:04 +00:00 committed by Alexandre Julliard
parent 977806a884
commit ee72fb2817
1 changed files with 13 additions and 3 deletions

View File

@ -6841,12 +6841,18 @@ static UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package)
HKEY hkey; HKEY hkey;
INT i; INT i;
MSIRECORD *uirow; MSIRECORD *uirow;
BOOL install_on_demand = TRUE;
if (!package) if (!package)
return ERROR_INVALID_HANDLE; return ERROR_INVALID_HANDLE;
load_classes_and_such(package); load_classes_and_such(package);
/* We need to set install_on_demand based on if the shell handles advertised
* shortcuts and the like. Because Mike McCormack is working on this i am
* going to default to TRUE
*/
for (i = 0; i < package->loaded_extensions; i++) for (i = 0; i < package->loaded_extensions; i++)
{ {
WCHAR extension[257]; WCHAR extension[257];
@ -6864,8 +6870,8 @@ static UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package)
*/ */
if ((!ACTION_VerifyFeatureForAction(package, f_index, if ((!ACTION_VerifyFeatureForAction(package, f_index,
INSTALLSTATE_LOCAL)) && INSTALLSTATE_LOCAL)) &&
(!ACTION_VerifyFeatureForAction(package, f_index, !(install_on_demand && ACTION_VerifyFeatureForAction(package,
INSTALLSTATE_ADVERTISED))) f_index, INSTALLSTATE_ADVERTISED)))
{ {
TRACE("Skipping extension %s reg due to disabled feature %s\n", TRACE("Skipping extension %s reg due to disabled feature %s\n",
debugstr_w(package->extensions[i].Extension), debugstr_w(package->extensions[i].Extension),
@ -6879,7 +6885,11 @@ static UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package)
package->extensions[i].Installed = TRUE; package->extensions[i].Installed = TRUE;
if (package->extensions[i].ProgIDIndex >= 0) /* this is only registered if the extension has at least 1 verb
* according to MSDN
*/
if (package->extensions[i].ProgIDIndex >= 0 &&
package->extensions[i].VerbCount > 0)
mark_progid_for_install(package, package->extensions[i].ProgIDIndex); mark_progid_for_install(package, package->extensions[i].ProgIDIndex);
if (package->extensions[i].MIMEIndex >= 0) if (package->extensions[i].MIMEIndex >= 0)