msi: Don't set an invalid install property in PublishProduct.

This commit is contained in:
James Hawkins 2008-06-23 22:58:24 -05:00 committed by Alexandre Julliard
parent 68e6071d3c
commit ee8b4a0132
2 changed files with 5 additions and 12 deletions

View File

@ -3413,7 +3413,7 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
LPWSTR packname;
HKEY hkey=0;
HKEY hukey=0;
HKEY hudkey=0, props=0;
HKEY hudkey=0;
HKEY source;
static const WCHAR szProductLanguage[] =
{'P','r','o','d','u','c','t','L','a','n','g','u','a','g','e',0};
@ -3439,10 +3439,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
rc = MSIREG_OpenLocalClassesProductKey(package->ProductCode, &hukey, TRUE);
if (rc != ERROR_SUCCESS)
goto end;
rc = MSIREG_OpenLocalSystemInstallProps(package->ProductCode, &props, TRUE);
if (rc != ERROR_SUCCESS)
goto end;
}
else
{
@ -3453,10 +3449,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
rc = MSIREG_OpenUserProductsKey(package->ProductCode,&hukey,TRUE);
if (rc != ERROR_SUCCESS)
goto end;
rc = MSIREG_OpenCurrentUserInstallProps(package->ProductCode, &props, TRUE);
if (rc != ERROR_SUCCESS)
goto end;
}
rc = RegCreateKeyW(hukey, szSourceList, &source);
@ -3481,7 +3473,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
/* FIXME */
msi_reg_set_val_dword( hukey, INSTALLPROPERTY_AUTHORIZED_LUA_APPW, 0 );
msi_reg_set_val_dword( props, INSTALLPROPERTY_INSTANCETYPEW, 0 );
buffer = msi_dup_property( package, szARPProductIcon );
if (buffer)
@ -3545,7 +3536,6 @@ end:
RegCloseKey(hkey);
RegCloseKey(hukey);
RegCloseKey(hudkey);
RegCloseKey(props);
return rc;
}

View File

@ -2464,7 +2464,7 @@ static void test_publish_publishproduct(void)
UINT r;
LONG res;
LPSTR usersid;
HKEY sourcelist, net;
HKEY sourcelist, net, props;
HKEY hkey, patches, media;
CHAR keypath[MAX_PATH];
CHAR temp[MAX_PATH];
@ -2504,6 +2504,9 @@ static void test_publish_publishproduct(void)
res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &hkey);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
res = RegOpenKeyA(hkey, "InstallProperties", &props);
ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
res = RegOpenKeyA(hkey, "Patches", &patches);
todo_wine
{