msi: Reimplement MsiGetProductInfo.

This commit is contained in:
James Hawkins 2008-02-12 01:35:46 -06:00 committed by Alexandre Julliard
parent 4823663957
commit 1f3d6a9744
5 changed files with 280 additions and 391 deletions

View File

@ -564,115 +564,162 @@ done:
static UINT WINAPI MSI_GetProductInfo(LPCWSTR szProduct, LPCWSTR szAttribute, static UINT WINAPI MSI_GetProductInfo(LPCWSTR szProduct, LPCWSTR szAttribute,
awstring *szValue, LPDWORD pcchValueBuf) awstring *szValue, LPDWORD pcchValueBuf)
{ {
UINT r; UINT r = ERROR_UNKNOWN_PROPERTY;
HKEY hkey; HKEY prodkey, userdata, source;
LPWSTR val = NULL; LPWSTR val = NULL;
WCHAR squished_pc[GUID_SIZE]; WCHAR squished_pc[GUID_SIZE];
WCHAR packagecode[GUID_SIZE];
BOOL classes = FALSE;
BOOL badconfig = FALSE;
LONG res;
DWORD save;
static WCHAR empty[] = {0};
static const WCHAR sourcelist[] = {
'S','o','u','r','c','e','L','i','s','t',0};
static const WCHAR display_name[] = {
'D','i','s','p','l','a','y','N','a','m','e',0};
static const WCHAR display_version[] = {
'D','i','s','p','l','a','y','V','e','r','s','i','o','n',0};
static const WCHAR assignment[] = {
'A','s','s','i','g','n','m','e','n','t',0};
TRACE("%s %s %p %p\n", debugstr_w(szProduct), TRACE("%s %s %p %p\n", debugstr_w(szProduct),
debugstr_w(szAttribute), szValue, pcchValueBuf); debugstr_w(szAttribute), szValue, pcchValueBuf);
/*
* FIXME: Values seem scattered/duplicated in the registry. Is there a system?
*/
if ((szValue->str.w && !pcchValueBuf) || !szProduct || !szAttribute) if ((szValue->str.w && !pcchValueBuf) || !szProduct || !szAttribute)
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
if (!squash_guid(szProduct, squished_pc)) if (!squash_guid(szProduct, squished_pc))
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
/* check for special properties */ r = MSIREG_OpenLocalManagedProductKey(szProduct, &prodkey, FALSE);
if (!lstrcmpW(szAttribute, INSTALLPROPERTY_PACKAGECODEW)) if (r != ERROR_SUCCESS)
{ {
LPWSTR regval; r = MSIREG_OpenUserProductsKey(szProduct, &prodkey, FALSE);
WCHAR packagecode[35];
r = MSIREG_OpenUserProductsKey(szProduct, &hkey, FALSE);
if (r != ERROR_SUCCESS) if (r != ERROR_SUCCESS)
return ERROR_UNKNOWN_PRODUCT;
regval = msi_reg_get_val_str( hkey, szAttribute );
if (regval)
{ {
if (unsquash_guid(regval, packagecode)) r = MSIREG_OpenLocalClassesProductKey(szProduct, &prodkey, FALSE);
val = strdupW(packagecode); if (r == ERROR_SUCCESS)
msi_free(regval); classes = TRUE;
} }
RegCloseKey(hkey);
} }
else if (!lstrcmpW(szAttribute, INSTALLPROPERTY_ASSIGNMENTTYPEW))
{
static const WCHAR one[] = { '1',0 };
/*
* FIXME: should be in the Product key (user or system?)
* but isn't written yet...
*/
val = strdupW( one );
}
else if (!lstrcmpW(szAttribute, INSTALLPROPERTY_LANGUAGEW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_VERSIONW))
{
static const WCHAR fmt[] = { '%','u',0 };
WCHAR szVal[16];
DWORD regval;
r = MSIREG_OpenUninstallKey(szProduct, &hkey, FALSE); if (classes)
if (r != ERROR_SUCCESS) MSIREG_OpenLocalSystemProductKey(szProduct, &userdata, FALSE);
return ERROR_UNKNOWN_PRODUCT;
if (msi_reg_get_val_dword( hkey, szAttribute, &regval))
{
sprintfW(szVal, fmt, regval);
val = strdupW( szVal );
}
RegCloseKey(hkey);
}
else if (!lstrcmpW(szAttribute, INSTALLPROPERTY_PRODUCTNAMEW))
{
r = MSIREG_OpenUserProductsKey(szProduct, &hkey, FALSE);
if (r != ERROR_SUCCESS)
return ERROR_UNKNOWN_PRODUCT;
val = msi_reg_get_val_str( hkey, szAttribute );
RegCloseKey(hkey);
}
else if (!szAttribute[0])
{
return ERROR_UNKNOWN_PROPERTY;
}
else else
MSIREG_OpenInstallPropertiesKey(szProduct, &userdata, FALSE);
if (!lstrcmpW(szAttribute, INSTALLPROPERTY_HELPLINKW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_HELPTELEPHONEW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_INSTALLDATEW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_INSTALLEDPRODUCTNAMEW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_INSTALLLOCATIONW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_INSTALLSOURCEW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_LOCALPACKAGEW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_PUBLISHERW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_URLINFOABOUTW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_URLUPDATEINFOW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_VERSIONMINORW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_VERSIONMAJORW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_VERSIONSTRINGW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_PRODUCTIDW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_REGCOMPANYW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_REGOWNERW))
{ {
static const WCHAR szDisplayVersion[] = { if (!prodkey)
'D','i','s','p','l','a','y','V','e','r','s','i','o','n',0 }; {
r = ERROR_UNKNOWN_PRODUCT;
goto done;
}
FIXME("%s\n", debugstr_w(szAttribute)); if (!userdata)
/* FIXME: some attribute values not tested... */ return ERROR_UNKNOWN_PROPERTY;
if (!lstrcmpW( szAttribute, INSTALLPROPERTY_VERSIONSTRINGW )) if (!lstrcmpW(szAttribute, INSTALLPROPERTY_INSTALLEDPRODUCTNAMEW))
szAttribute = szDisplayVersion; szAttribute = display_name;
else if (!lstrcmpW(szAttribute, INSTALLPROPERTY_VERSIONSTRINGW))
szAttribute = display_version;
r = MSIREG_OpenUninstallKey( szProduct, &hkey, FALSE ); val = msi_reg_get_val_str(userdata, szAttribute);
if (r != ERROR_SUCCESS) if (!val)
return ERROR_UNKNOWN_PRODUCT; val = empty;
val = msi_reg_get_val_str( hkey, szAttribute );
RegCloseKey(hkey);
} }
else if (!lstrcmpW(szAttribute, INSTALLPROPERTY_INSTANCETYPEW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_TRANSFORMSW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_LANGUAGEW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_PRODUCTNAMEW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_ASSIGNMENTTYPEW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_PACKAGECODEW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_VERSIONW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_PRODUCTICONW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_PACKAGENAMEW) ||
!lstrcmpW(szAttribute, INSTALLPROPERTY_AUTHORIZED_LUA_APPW))
{
if (!prodkey)
{
r = ERROR_UNKNOWN_PRODUCT;
goto done;
}
TRACE("returning %s\n", debugstr_w(val)); if (!lstrcmpW(szAttribute, INSTALLPROPERTY_ASSIGNMENTTYPEW))
szAttribute = assignment;
if (!lstrcmpW(szAttribute, INSTALLPROPERTY_PACKAGENAMEW))
{
res = RegOpenKeyW(prodkey, sourcelist, &source);
if (res == ERROR_SUCCESS)
val = msi_reg_get_val_str(source, szAttribute);
RegCloseKey(source);
}
else
{
val = msi_reg_get_val_str(prodkey, szAttribute);
if (!val)
val = empty;
}
if (val != empty && !lstrcmpW(szAttribute, INSTALLPROPERTY_PACKAGECODEW))
{
if (lstrlenW(val) != SQUISH_GUID_SIZE - 1)
badconfig = TRUE;
else
{
unsquash_guid(val, packagecode);
msi_free(val);
val = strdupW(packagecode);
}
}
}
if (!val) if (!val)
return ERROR_UNKNOWN_PROPERTY; {
r = ERROR_UNKNOWN_PROPERTY;
goto done;
}
r = msi_strcpy_to_awstring( val, szValue, pcchValueBuf ); save = *pcchValueBuf;
msi_free(val); if (lstrlenW(val) < *pcchValueBuf)
r = msi_strcpy_to_awstring(val, szValue, pcchValueBuf);
else if (szValue->str.a || szValue->str.w)
r = ERROR_MORE_DATA;
if (!badconfig)
*pcchValueBuf = lstrlenW(val);
else if (r == ERROR_SUCCESS)
{
*pcchValueBuf = save;
r = ERROR_BAD_CONFIGURATION;
}
if (val != empty)
msi_free(val);
done:
RegCloseKey(prodkey);
RegCloseKey(userdata);
return r; return r;
} }

View File

@ -568,6 +568,7 @@ typedef struct tagMSISCRIPT
#define MSI_BUILDNUMBER 4000 #define MSI_BUILDNUMBER 4000
#define GUID_SIZE 39 #define GUID_SIZE 39
#define SQUISH_GUID_SIZE 33
#define MSIHANDLE_MAGIC 0x4d434923 #define MSIHANDLE_MAGIC 0x4d434923

View File

@ -231,8 +231,6 @@ static const WCHAR szInstaller_LocalManagedProd_fmt[] = {
'I','n','s','t','a','l','l','e','r','\\', 'I','n','s','t','a','l','l','e','r','\\',
'P','r','o','d','u','c','t','s','\\','%','s',0}; 'P','r','o','d','u','c','t','s','\\','%','s',0};
#define SQUISH_GUID_SIZE 33
BOOL unsquash_guid(LPCWSTR in, LPWSTR out) BOOL unsquash_guid(LPCWSTR in, LPWSTR out)
{ {
DWORD i,n=0; DWORD i,n=0;

View File

@ -2140,14 +2140,14 @@ static void test_Installer_InstallProduct(void)
/* Package name */ /* Package name */
memset(szString, 0, sizeof(szString)); memset(szString, 0, sizeof(szString));
hr = Installer_ProductInfo(szProductCode, WINE_INSTALLPROPERTY_PACKAGENAMEW, szString); hr = Installer_ProductInfo(szProductCode, WINE_INSTALLPROPERTY_PACKAGENAMEW, szString);
todo_wine ok(hr == S_OK, "Installer_ProductInfo failed, hresult 0x%08x\n", hr); ok(hr == S_OK, "Installer_ProductInfo failed, hresult 0x%08x\n", hr);
todo_wine ok_w2("Installer_ProductInfo returned %s but expected %s\n", szString, szMsifile); todo_wine ok_w2("Installer_ProductInfo returned %s but expected %s\n", szString, szMsifile);
/* Product name */ /* Product name */
memset(szString, 0, sizeof(szString)); memset(szString, 0, sizeof(szString));
hr = Installer_ProductInfo(szProductCode, WINE_INSTALLPROPERTY_PRODUCTNAMEW, szString); hr = Installer_ProductInfo(szProductCode, WINE_INSTALLPROPERTY_PRODUCTNAMEW, szString);
ok(hr == S_OK, "Installer_ProductInfo failed, hresult 0x%08x\n", hr); ok(hr == S_OK, "Installer_ProductInfo failed, hresult 0x%08x\n", hr);
ok_w2("Installer_ProductInfo returned %s but expected %s\n", szString, szMSITEST); todo_wine ok_w2("Installer_ProductInfo returned %s but expected %s\n", szString, szMSITEST);
/* Installer::Products */ /* Installer::Products */
test_Installer_Products(TRUE); test_Installer_Products(TRUE);
@ -2249,6 +2249,11 @@ static void test_Installer_InstallProduct(void)
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); todo_wine ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_SUCCESS, got %d\n", res);
res = delete_registry_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\"
"CurrentVersion\\Installer\\Managed\\S-1-5-4\\"
"Installer\\Products\\05FA3C1F65B896A40AC00077F34EF203");
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
/* Delete installation files we installed */ /* Delete installation files we installed */
delete_test_files(); delete_test_files();
} }

View File

@ -2166,11 +2166,8 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz);
todo_wine ok(r == ERROR_UNKNOWN_PROPERTY,
{ "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
}
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
@ -2206,11 +2203,8 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz);
todo_wine ok(r == ERROR_UNKNOWN_PROPERTY,
{ "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
}
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
@ -2221,12 +2215,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz);
todo_wine ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
{ ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 0, "Expected 0, got %d\n", sz);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
ok(sz == 0, "Expected 0, got %d\n", sz);
}
res = RegSetValueExA(propkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5); res = RegSetValueExA(propkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2235,50 +2226,35 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz);
todo_wine ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
{ ok(!lstrcmpA(buf, "link"), "Expected \"link\", got \"%s\"\n", buf);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 4, "Expected 4, got %d\n", sz);
ok(!lstrcmpA(buf, "link"), "Expected \"link\", got \"%s\"\n", buf);
ok(sz == 4, "Expected 4, got %d\n", sz);
}
/* lpValueBuf is NULL */ /* lpValueBuf is NULL */
sz = MAX_PATH; sz = MAX_PATH;
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, NULL, &sz); r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, NULL, &sz);
todo_wine ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
{ ok(sz == 4, "Expected 4, got %d\n", sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(sz == 4, "Expected 4, got %d\n", sz);
}
/* lpValueBuf is NULL, pcchValueBuf is too small */ /* lpValueBuf is NULL, pcchValueBuf is too small */
sz = 2; sz = 2;
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, NULL, &sz); r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, NULL, &sz);
todo_wine ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
{ ok(sz == 4, "Expected 4, got %d\n", sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(sz == 4, "Expected 4, got %d\n", sz);
}
/* lpValueBuf is NULL, pcchValueBuf is too small */ /* lpValueBuf is NULL, pcchValueBuf is too small */
sz = 2; sz = 2;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz);
ok(!lstrcmpA(buf, "apple"), "Expected buf to remain unchanged, got \"%s\"\n", buf); ok(!lstrcmpA(buf, "apple"), "Expected buf to remain unchanged, got \"%s\"\n", buf);
todo_wine ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r);
{ ok(sz == 4, "Expected 4, got %d\n", sz);
ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r);
ok(sz == 4, "Expected 4, got %d\n", sz);
}
/* lpValueBuf is NULL, pcchValueBuf is exactly 4 */ /* lpValueBuf is NULL, pcchValueBuf is exactly 4 */
sz = 4; sz = 4;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz);
todo_wine ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r);
{
ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r);
}
ok(!lstrcmpA(buf, "apple"), ok(!lstrcmpA(buf, "apple"),
"Expected buf to remain unchanged, got \"%s\"\n", buf); "Expected buf to remain unchanged, got \"%s\"\n", buf);
ok(sz == 4, "Expected 4, got %d\n", sz); ok(sz == 4, "Expected 4, got %d\n", sz);
@ -2290,11 +2266,8 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, "IMadeThis", buf, &sz); r = MsiGetProductInfoA(prodcode, "IMadeThis", buf, &sz);
todo_wine ok(r == ERROR_UNKNOWN_PROPERTY,
{ "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
}
ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf); ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf);
ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
@ -2317,11 +2290,8 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz);
todo_wine ok(r == ERROR_UNKNOWN_PROPERTY,
{ "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
}
ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf); ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf);
ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
@ -2337,11 +2307,8 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz);
todo_wine ok(r == ERROR_UNKNOWN_PROPERTY,
{ "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
}
ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf); ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf);
ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
@ -2352,12 +2319,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz);
todo_wine ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
{ ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 0, "Expected 0, got %d\n", sz);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
ok(sz == 0, "Expected 0, got %d\n", sz);
}
res = RegSetValueExA(propkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5); res = RegSetValueExA(propkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2366,12 +2330,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz);
todo_wine ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
{ ok(!lstrcmpA(buf, "link"), "Expected \"link\", got \"%s\"\n", buf);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 4, "Expected 4, got %d\n", sz);
ok(!lstrcmpA(buf, "link"), "Expected \"link\", got \"%s\"\n", buf);
ok(sz == 4, "Expected 4, got %d\n", sz);
}
RegDeleteValueA(propkey, "HelpLink"); RegDeleteValueA(propkey, "HelpLink");
RegDeleteKeyA(propkey, ""); RegDeleteKeyA(propkey, "");
@ -2391,11 +2352,8 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz);
todo_wine ok(r == ERROR_UNKNOWN_PROPERTY,
{ "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
}
ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf); ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf);
ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
@ -2411,11 +2369,8 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz);
todo_wine ok(r == ERROR_UNKNOWN_PROPERTY,
{ "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
}
ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf); ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf);
ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
@ -2426,11 +2381,8 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz);
todo_wine ok(r == ERROR_UNKNOWN_PROPERTY,
{ "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
}
ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf); ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf);
ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
@ -2450,11 +2402,8 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz);
todo_wine ok(r == ERROR_UNKNOWN_PROPERTY,
{ "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
}
ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf); ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf);
ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
@ -2465,12 +2414,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz);
todo_wine ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
{ ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 0, "Expected 0, got %d\n", sz);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
ok(sz == 0, "Expected 0, got %d\n", sz);
}
res = RegSetValueExA(propkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5); res = RegSetValueExA(propkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2479,12 +2425,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz);
todo_wine ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
{ ok(!lstrcmpA(buf, "link"), "Expected \"link\", got \"%s\"\n", buf);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 4, "Expected 4, got %d\n", sz);
ok(!lstrcmpA(buf, "link"), "Expected \"link\", got \"%s\"\n", buf);
ok(sz == 4, "Expected 4, got %d\n", sz);
}
res = RegSetValueExA(propkey, "DisplayName", 0, REG_SZ, (LPBYTE)"name", 5); res = RegSetValueExA(propkey, "DisplayName", 0, REG_SZ, (LPBYTE)"name", 5);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2493,12 +2436,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLEDPRODUCTNAME, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 4, "Expected 4, got %d\n", sz);
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); res = RegSetValueExA(propkey, "DisplayVersion", 0, REG_SZ, (LPBYTE)"1.1.1", 6);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2507,12 +2447,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSIONSTRING, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 5, "Expected 5, got %d\n", sz);
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); res = RegSetValueExA(propkey, "HelpTelephone", 0, REG_SZ, (LPBYTE)"tele", 5);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2521,12 +2458,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPTELEPHONE, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 4, "Expected 4, got %d\n", sz);
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); res = RegSetValueExA(propkey, "InstallLocation", 0, REG_SZ, (LPBYTE)"loc", 4);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2535,12 +2469,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLLOCATION, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 3, "Expected 3, got %d\n", sz);
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); res = RegSetValueExA(propkey, "InstallSource", 0, REG_SZ, (LPBYTE)"source", 7);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2549,12 +2480,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLSOURCE, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 6, "Expected 6, got %d\n", sz);
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); res = RegSetValueExA(propkey, "InstallDate", 0, REG_SZ, (LPBYTE)"date", 5);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2563,12 +2491,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLDATE, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 4, "Expected 4, got %d\n", sz);
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); res = RegSetValueExA(propkey, "Publisher", 0, REG_SZ, (LPBYTE)"pub", 4);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2577,12 +2502,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PUBLISHER, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 3, "Expected 3, got %d\n", sz);
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); res = RegSetValueExA(propkey, "LocalPackage", 0, REG_SZ, (LPBYTE)"pack", 5);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2591,12 +2513,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_LOCALPACKAGE, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 4, "Expected 4, got %d\n", sz);
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); res = RegSetValueExA(propkey, "UrlInfoAbout", 0, REG_SZ, (LPBYTE)"about", 6);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2605,12 +2524,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_URLINFOABOUT, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 5, "Expected 5, got %d\n", sz);
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); res = RegSetValueExA(propkey, "UrlUpdateInfo", 0, REG_SZ, (LPBYTE)"info", 5);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2619,12 +2535,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_URLUPDATEINFO, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 4, "Expected 4, got %d\n", sz);
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); res = RegSetValueExA(propkey, "VersionMinor", 0, REG_SZ, (LPBYTE)"1", 2);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2633,12 +2546,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSIONMINOR, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 1, "Expected 1, got %d\n", sz);
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); res = RegSetValueExA(propkey, "VersionMajor", 0, REG_SZ, (LPBYTE)"1", 2);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2647,12 +2557,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSIONMAJOR, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 1, "Expected 1, got %d\n", sz);
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); res = RegSetValueExA(propkey, "ProductID", 0, REG_SZ, (LPBYTE)"id", 3);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2661,12 +2568,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTID, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 2, "Expected 2, got %d\n", sz);
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); res = RegSetValueExA(propkey, "RegCompany", 0, REG_SZ, (LPBYTE)"comp", 5);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2675,12 +2579,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_REGCOMPANY, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 4, "Expected 4, got %d\n", sz);
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); res = RegSetValueExA(propkey, "RegOwner", 0, REG_SZ, (LPBYTE)"own", 4);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2689,12 +2590,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_REGOWNER, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 3, "Expected 3, got %d\n", sz);
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); res = RegSetValueExA(propkey, "InstanceType", 0, REG_SZ, (LPBYTE)"type", 5);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2703,12 +2601,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTANCETYPE, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 0, "Expected 0, got %d\n", sz);
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); res = RegSetValueExA(prodkey, "InstanceType", 0, REG_SZ, (LPBYTE)"type", 5);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2717,12 +2612,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTANCETYPE, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 4, "Expected 4, got %d\n", sz);
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); res = RegSetValueExA(propkey, "Transforms", 0, REG_SZ, (LPBYTE)"tforms", 7);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2731,12 +2623,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_TRANSFORMS, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 0, "Expected 0, got %d\n", sz);
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); res = RegSetValueExA(prodkey, "Transforms", 0, REG_SZ, (LPBYTE)"tforms", 7);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2745,12 +2634,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_TRANSFORMS, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 6, "Expected 6, got %d\n", sz);
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); res = RegSetValueExA(propkey, "Language", 0, REG_SZ, (LPBYTE)"lang", 5);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2759,12 +2645,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_LANGUAGE, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 0, "Expected 0, got %d\n", sz);
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); res = RegSetValueExA(prodkey, "Language", 0, REG_SZ, (LPBYTE)"lang", 5);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2773,12 +2656,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_LANGUAGE, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 4, "Expected 4, got %d\n", sz);
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); res = RegSetValueExA(propkey, "ProductName", 0, REG_SZ, (LPBYTE)"name", 5);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2787,12 +2667,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTNAME, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 0, "Expected 0, got %d\n", sz);
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); res = RegSetValueExA(prodkey, "ProductName", 0, REG_SZ, (LPBYTE)"name", 5);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2801,12 +2678,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTNAME, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 4, "Expected 4, got %d\n", sz);
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); res = RegSetValueExA(propkey, "Assignment", 0, REG_SZ, (LPBYTE)"at", 3);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2816,11 +2690,8 @@ static void test_MsiGetProductInfo(void)
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_ASSIGNMENTTYPE, buf, &sz); r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_ASSIGNMENTTYPE, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); 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);
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); res = RegSetValueExA(prodkey, "Assignment", 0, REG_SZ, (LPBYTE)"at", 3);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2830,11 +2701,8 @@ static void test_MsiGetProductInfo(void)
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_ASSIGNMENTTYPE, buf, &sz); r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_ASSIGNMENTTYPE, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); 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);
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); res = RegSetValueExA(propkey, "PackageCode", 0, REG_SZ, (LPBYTE)"code", 5);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2843,12 +2711,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGECODE, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 0, "Expected 0, got %d\n", sz);
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); res = RegSetValueExA(prodkey, "PackageCode", 0, REG_SZ, (LPBYTE)"code", 5);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2857,12 +2722,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGECODE, buf, &sz); r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGECODE, buf, &sz);
todo_wine ok(r == ERROR_BAD_CONFIGURATION,
{ "Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
ok(r == ERROR_BAD_CONFIGURATION, ok(!lstrcmpA(buf, "code"), "Expected \"code\", got \"%s\"\n", buf);
"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); ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
res = RegSetValueExA(prodkey, "PackageCode", 0, REG_SZ, (LPBYTE)pack_squashed, 33); res = RegSetValueExA(prodkey, "PackageCode", 0, REG_SZ, (LPBYTE)pack_squashed, 33);
@ -2872,12 +2734,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGECODE, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 38, "Expected 38, got %d\n", sz);
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); res = RegSetValueExA(propkey, "Version", 0, REG_SZ, (LPBYTE)"ver", 4);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2886,12 +2745,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSION, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 0, "Expected 0, got %d\n", sz);
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); res = RegSetValueExA(prodkey, "Version", 0, REG_SZ, (LPBYTE)"ver", 4);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2900,12 +2756,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSION, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 3, "Expected 3, got %d\n", sz);
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); res = RegSetValueExA(propkey, "ProductIcon", 0, REG_SZ, (LPBYTE)"ico", 4);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2914,12 +2767,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTICON, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 0, "Expected 0, got %d\n", sz);
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); res = RegSetValueExA(prodkey, "ProductIcon", 0, REG_SZ, (LPBYTE)"ico", 4);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2928,12 +2778,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTICON, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 3, "Expected 3, got %d\n", sz);
ok(!lstrcmpA(buf, "ico"), "Expected \"ico\", got \"%s\"\n", buf);
ok(sz == 3, "Expected 3, got %d\n", sz);
}
res = RegCreateKeyA(prodkey, "SourceList", &source); res = RegCreateKeyA(prodkey, "SourceList", &source);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2944,12 +2791,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGENAME, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 8, "Expected 8, got %d\n", sz);
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); res = RegSetValueExA(propkey, "AuthorizedLUAApp", 0, REG_SZ, (LPBYTE)"auth", 5);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2958,12 +2802,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_AUTHORIZED_LUA_APP, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 0, "Expected 0, got %d\n", sz);
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); res = RegSetValueExA(prodkey, "AuthorizedLUAApp", 0, REG_SZ, (LPBYTE)"auth", 5);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@ -2972,12 +2813,9 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH; sz = MAX_PATH;
lstrcpyA(buf, "apple"); lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_AUTHORIZED_LUA_APP, buf, &sz); 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(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 4, "Expected 4, got %d\n", sz);
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, "DisplayName");