msi: Test the remaining installer properties returned by MsiGetProductInfo.
This commit is contained in:
parent
ff0dc44f2d
commit
f461a8d4c1
|
@ -2046,16 +2046,19 @@ static void test_MsiGetProductInfo(void)
|
||||||
{
|
{
|
||||||
UINT r;
|
UINT r;
|
||||||
LONG res;
|
LONG res;
|
||||||
HKEY propkey;
|
HKEY propkey, source;
|
||||||
HKEY prodkey, localkey;
|
HKEY prodkey, localkey;
|
||||||
CHAR prodcode[MAX_PATH];
|
CHAR prodcode[MAX_PATH];
|
||||||
CHAR prod_squashed[MAX_PATH];
|
CHAR prod_squashed[MAX_PATH];
|
||||||
|
CHAR packcode[MAX_PATH];
|
||||||
|
CHAR pack_squashed[MAX_PATH];
|
||||||
CHAR buf[MAX_PATH];
|
CHAR buf[MAX_PATH];
|
||||||
CHAR keypath[MAX_PATH];
|
CHAR keypath[MAX_PATH];
|
||||||
LPSTR usersid;
|
LPSTR usersid;
|
||||||
DWORD sz;
|
DWORD sz;
|
||||||
|
|
||||||
create_test_guid(prodcode, prod_squashed);
|
create_test_guid(prodcode, prod_squashed);
|
||||||
|
create_test_guid(packcode, pack_squashed);
|
||||||
get_user_sid(&usersid);
|
get_user_sid(&usersid);
|
||||||
|
|
||||||
/* NULL szProduct */
|
/* NULL szProduct */
|
||||||
|
@ -2483,12 +2486,541 @@ static void test_MsiGetProductInfo(void)
|
||||||
ok(sz == 4, "Expected 4, got %d\n", sz);
|
ok(sz == 4, "Expected 4, got %d\n", sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "DisplayName", 0, REG_SZ, (LPBYTE)"name", 5);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* DisplayName value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLEDPRODUCTNAME, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "name"), "Expected \"name\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 4, "Expected 4, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "DisplayVersion", 0, REG_SZ, (LPBYTE)"1.1.1", 6);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* DisplayVersion value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSIONSTRING, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "1.1.1"), "Expected \"1.1.1\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 5, "Expected 5, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "HelpTelephone", 0, REG_SZ, (LPBYTE)"tele", 5);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* HelpTelephone value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPTELEPHONE, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "tele"), "Expected \"tele\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 4, "Expected 4, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "InstallLocation", 0, REG_SZ, (LPBYTE)"loc", 4);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* InstallLocation value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLLOCATION, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "loc"), "Expected \"loc\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 3, "Expected 3, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "InstallSource", 0, REG_SZ, (LPBYTE)"source", 7);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* InstallSource value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLSOURCE, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "source"), "Expected \"source\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 6, "Expected 6, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "InstallDate", 0, REG_SZ, (LPBYTE)"date", 5);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* InstallDate value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLDATE, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "date"), "Expected \"date\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 4, "Expected 4, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "Publisher", 0, REG_SZ, (LPBYTE)"pub", 4);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* Publisher value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PUBLISHER, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "pub"), "Expected \"pub\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 3, "Expected 3, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "LocalPackage", 0, REG_SZ, (LPBYTE)"pack", 5);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* LocalPackage value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_LOCALPACKAGE, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "pack"), "Expected \"pack\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 4, "Expected 4, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "UrlInfoAbout", 0, REG_SZ, (LPBYTE)"about", 6);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* UrlInfoAbout value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_URLINFOABOUT, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "about"), "Expected \"about\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 5, "Expected 5, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "UrlUpdateInfo", 0, REG_SZ, (LPBYTE)"info", 5);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* UrlUpdateInfo value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_URLUPDATEINFO, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "info"), "Expected \"info\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 4, "Expected 4, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "VersionMinor", 0, REG_SZ, (LPBYTE)"1", 2);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* VersionMinor value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSIONMINOR, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "1"), "Expected \"1\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 1, "Expected 1, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "VersionMajor", 0, REG_SZ, (LPBYTE)"1", 2);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* VersionMajor value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSIONMAJOR, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "1"), "Expected \"1\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 1, "Expected 1, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "ProductID", 0, REG_SZ, (LPBYTE)"id", 3);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* ProductID value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTID, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "id"), "Expected \"id\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 2, "Expected 2, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "RegCompany", 0, REG_SZ, (LPBYTE)"comp", 5);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* RegCompany value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_REGCOMPANY, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "comp"), "Expected \"comp\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 4, "Expected 4, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "RegOwner", 0, REG_SZ, (LPBYTE)"own", 4);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* RegOwner value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_REGOWNER, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "own"), "Expected \"own\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 3, "Expected 3, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "InstanceType", 0, REG_SZ, (LPBYTE)"type", 5);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* InstanceType value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTANCETYPE, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 0, "Expected 0, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(prodkey, "InstanceType", 0, REG_SZ, (LPBYTE)"type", 5);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* InstanceType value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTANCETYPE, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "type"), "Expected \"type\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 4, "Expected 4, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "Transforms", 0, REG_SZ, (LPBYTE)"tforms", 7);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* Transforms value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_TRANSFORMS, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 0, "Expected 0, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(prodkey, "Transforms", 0, REG_SZ, (LPBYTE)"tforms", 7);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* Transforms value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_TRANSFORMS, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "tforms"), "Expected \"tforms\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 6, "Expected 6, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "Language", 0, REG_SZ, (LPBYTE)"lang", 5);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* Language value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_LANGUAGE, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 0, "Expected 0, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(prodkey, "Language", 0, REG_SZ, (LPBYTE)"lang", 5);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* Language value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_LANGUAGE, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "lang"), "Expected \"lang\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 4, "Expected 4, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "ProductName", 0, REG_SZ, (LPBYTE)"name", 5);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* ProductName value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTNAME, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 0, "Expected 0, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(prodkey, "ProductName", 0, REG_SZ, (LPBYTE)"name", 5);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* ProductName value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTNAME, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "name"), "Expected \"name\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 4, "Expected 4, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "Assignment", 0, REG_SZ, (LPBYTE)"at", 3);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* AssignmentType value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_ASSIGNMENTTYPE, buf, &sz);
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 0, "Expected 0, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(prodkey, "Assignment", 0, REG_SZ, (LPBYTE)"at", 3);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* AssignmentType value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_ASSIGNMENTTYPE, buf, &sz);
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(!lstrcmpA(buf, "at"), "Expected \"at\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 2, "Expected 2, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "PackageCode", 0, REG_SZ, (LPBYTE)"code", 5);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* PackageCode value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGECODE, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 0, "Expected 0, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(prodkey, "PackageCode", 0, REG_SZ, (LPBYTE)"code", 5);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* PackageCode value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGECODE, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_BAD_CONFIGURATION,
|
||||||
|
"Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "code"), "Expected \"code\", got \"%s\"\n", buf);
|
||||||
|
}
|
||||||
|
ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
|
||||||
|
|
||||||
|
res = RegSetValueExA(prodkey, "PackageCode", 0, REG_SZ, (LPBYTE)pack_squashed, 33);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* PackageCode value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGECODE, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, packcode), "Expected \"%s\", got \"%s\"\n", packcode, buf);
|
||||||
|
ok(sz == 38, "Expected 38, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "Version", 0, REG_SZ, (LPBYTE)"ver", 4);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* Version value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSION, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 0, "Expected 0, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(prodkey, "Version", 0, REG_SZ, (LPBYTE)"ver", 4);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* Version value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSION, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "ver"), "Expected \"ver\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 3, "Expected 3, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "ProductIcon", 0, REG_SZ, (LPBYTE)"ico", 4);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* ProductIcon value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTICON, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 0, "Expected 0, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(prodkey, "ProductIcon", 0, REG_SZ, (LPBYTE)"ico", 4);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* ProductIcon value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTICON, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "ico"), "Expected \"ico\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 3, "Expected 3, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegCreateKeyA(prodkey, "SourceList", &source);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
res = RegSetValueExA(source, "PackageName", 0, REG_SZ, (LPBYTE)"packname", 9);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGENAME, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "packname"), "Expected \"packname\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 8, "Expected 8, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(propkey, "AuthorizedLUAApp", 0, REG_SZ, (LPBYTE)"auth", 5);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* Authorized value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_AUTHORIZED_LUA_APP, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 0, "Expected 0, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = RegSetValueExA(prodkey, "AuthorizedLUAApp", 0, REG_SZ, (LPBYTE)"auth", 5);
|
||||||
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
|
/* Authorized value exists */
|
||||||
|
sz = MAX_PATH;
|
||||||
|
lstrcpyA(buf, "apple");
|
||||||
|
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_AUTHORIZED_LUA_APP, buf, &sz);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
ok(!lstrcmpA(buf, "auth"), "Expected \"auth\", got \"%s\"\n", buf);
|
||||||
|
ok(sz == 4, "Expected 4, got %d\n", sz);
|
||||||
|
}
|
||||||
|
|
||||||
RegDeleteValueA(propkey, "HelpLink");
|
RegDeleteValueA(propkey, "HelpLink");
|
||||||
|
RegDeleteValueA(propkey, "DisplayName");
|
||||||
|
RegDeleteValueA(propkey, "DisplayVersion");
|
||||||
|
RegDeleteValueA(propkey, "HelpTelephone");
|
||||||
|
RegDeleteValueA(propkey, "InstallLocation");
|
||||||
|
RegDeleteValueA(propkey, "InstallSource");
|
||||||
|
RegDeleteValueA(propkey, "InstallDate");
|
||||||
|
RegDeleteValueA(propkey, "Publisher");
|
||||||
|
RegDeleteValueA(propkey, "LocalPackage");
|
||||||
|
RegDeleteValueA(propkey, "UrlInfoAbout");
|
||||||
|
RegDeleteValueA(propkey, "UrlUpdateInfo");
|
||||||
|
RegDeleteValueA(propkey, "VersionMinor");
|
||||||
|
RegDeleteValueA(propkey, "VersionMajor");
|
||||||
|
RegDeleteValueA(propkey, "ProductID");
|
||||||
|
RegDeleteValueA(propkey, "RegCompany");
|
||||||
|
RegDeleteValueA(propkey, "RegOwner");
|
||||||
|
RegDeleteValueA(propkey, "InstanceType");
|
||||||
|
RegDeleteValueA(propkey, "Transforms");
|
||||||
|
RegDeleteValueA(propkey, "Language");
|
||||||
|
RegDeleteValueA(propkey, "ProductName");
|
||||||
|
RegDeleteValueA(propkey, "Assignment");
|
||||||
|
RegDeleteValueA(propkey, "PackageCode");
|
||||||
|
RegDeleteValueA(propkey, "Version");
|
||||||
|
RegDeleteValueA(propkey, "ProductIcon");
|
||||||
|
RegDeleteValueA(propkey, "AuthorizedLUAApp");
|
||||||
RegDeleteKeyA(propkey, "");
|
RegDeleteKeyA(propkey, "");
|
||||||
RegDeleteKeyA(localkey, "");
|
RegDeleteKeyA(localkey, "");
|
||||||
|
RegDeleteValueA(prodkey, "InstanceType");
|
||||||
|
RegDeleteValueA(prodkey, "Transforms");
|
||||||
|
RegDeleteValueA(prodkey, "Language");
|
||||||
|
RegDeleteValueA(prodkey, "ProductName");
|
||||||
|
RegDeleteValueA(prodkey, "Assignment");
|
||||||
|
RegDeleteValueA(prodkey, "PackageCode");
|
||||||
|
RegDeleteValueA(prodkey, "Version");
|
||||||
|
RegDeleteValueA(prodkey, "ProductIcon");
|
||||||
|
RegDeleteValueA(prodkey, "AuthorizedLUAApp");
|
||||||
|
RegDeleteValueA(source, "PackageName");
|
||||||
|
RegDeleteKeyA(source, "");
|
||||||
RegDeleteKeyA(prodkey, "");
|
RegDeleteKeyA(prodkey, "");
|
||||||
RegCloseKey(propkey);
|
RegCloseKey(propkey);
|
||||||
RegCloseKey(localkey);
|
RegCloseKey(localkey);
|
||||||
|
RegCloseKey(source);
|
||||||
RegCloseKey(prodkey);
|
RegCloseKey(prodkey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue