mirror of
https://github.com/reactos/wine.git
synced 2024-11-29 14:40:56 +00:00
msi: Don't publish the product to an invalid location.
This commit is contained in:
parent
ee8b4a0132
commit
d809b4e2d9
@ -3411,7 +3411,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
|
|||||||
{
|
{
|
||||||
UINT rc;
|
UINT rc;
|
||||||
LPWSTR packname;
|
LPWSTR packname;
|
||||||
HKEY hkey=0;
|
|
||||||
HKEY hukey=0;
|
HKEY hukey=0;
|
||||||
HKEY hudkey=0;
|
HKEY hudkey=0;
|
||||||
HKEY source;
|
HKEY source;
|
||||||
@ -3442,10 +3441,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rc = MSIREG_OpenProductsKey(package->ProductCode,&hkey,TRUE);
|
|
||||||
if (rc != ERROR_SUCCESS)
|
|
||||||
goto end;
|
|
||||||
|
|
||||||
rc = MSIREG_OpenUserProductsKey(package->ProductCode,&hukey,TRUE);
|
rc = MSIREG_OpenUserProductsKey(package->ProductCode,&hukey,TRUE);
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
goto end;
|
goto end;
|
||||||
@ -3533,7 +3528,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
|
|||||||
rc = msi_publish_icons(package);
|
rc = msi_publish_icons(package);
|
||||||
|
|
||||||
end:
|
end:
|
||||||
RegCloseKey(hkey);
|
|
||||||
RegCloseKey(hukey);
|
RegCloseKey(hukey);
|
||||||
RegCloseKey(hudkey);
|
RegCloseKey(hudkey);
|
||||||
|
|
||||||
|
@ -2009,9 +2009,12 @@ static void test_Installer_Products(BOOL bProductInstalled)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ok(bProductInstalled == bProductFound, "Product expected to %s installed but product code was %s\n",
|
if (bProductInstalled) todo_wine
|
||||||
bProductInstalled ? "be" : "not be",
|
{
|
||||||
bProductFound ? "found" : "not found");
|
ok(bProductInstalled == bProductFound, "Product expected to %s installed but product code was %s\n",
|
||||||
|
bProductInstalled ? "be" : "not be",
|
||||||
|
bProductFound ? "found" : "not found");
|
||||||
|
}
|
||||||
|
|
||||||
if (pEnum)
|
if (pEnum)
|
||||||
{
|
{
|
||||||
@ -2306,7 +2309,7 @@ static void test_Installer_InstallProduct(void)
|
|||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
|
|
||||||
res = RegDeleteKeyA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Installer\\Products\\05FA3C1F65B896A40AC00077F34EF203");
|
res = RegDeleteKeyA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Installer\\Products\\05FA3C1F65B896A40AC00077F34EF203");
|
||||||
todo_wine ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_SUCCESS, got %d\n", res);
|
ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
|
||||||
|
|
||||||
/* Delete installation files we installed */
|
/* Delete installation files we installed */
|
||||||
delete_test_files();
|
delete_test_files();
|
||||||
|
@ -2477,6 +2477,9 @@ static void test_publish_publishproduct(void)
|
|||||||
"\\84A88FD7F6998CE40A22FB59F6B9C2BB";
|
"\\84A88FD7F6998CE40A22FB59F6B9C2BB";
|
||||||
static const CHAR cuupgrades[] = "Software\\Microsoft\\Installer\\UpgradeCodes"
|
static const CHAR cuupgrades[] = "Software\\Microsoft\\Installer\\UpgradeCodes"
|
||||||
"\\51AAE0C44620A5E4788506E91F249BD2";
|
"\\51AAE0C44620A5E4788506E91F249BD2";
|
||||||
|
static const CHAR badprod[] = "Software\\Microsoft\\Windows\\CurrentVersion"
|
||||||
|
"\\Installer\\Products"
|
||||||
|
"\\84A88FD7F6998CE40A22FB59F6B9C2BB";
|
||||||
|
|
||||||
get_user_sid(&usersid);
|
get_user_sid(&usersid);
|
||||||
if (!usersid)
|
if (!usersid)
|
||||||
@ -2500,6 +2503,9 @@ static void test_publish_publishproduct(void)
|
|||||||
ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
|
ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
|
||||||
ok(delete_pf("msitest", FALSE), "File not installed\n");
|
ok(delete_pf("msitest", FALSE), "File not installed\n");
|
||||||
|
|
||||||
|
res = RegOpenKeyA(HKEY_LOCAL_MACHINE, badprod, &hkey);
|
||||||
|
ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
|
||||||
|
|
||||||
sprintf(keypath, prodpath, usersid);
|
sprintf(keypath, prodpath, usersid);
|
||||||
res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &hkey);
|
res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &hkey);
|
||||||
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
Loading…
Reference in New Issue
Block a user