There is installed Microsoft Office 2013 on my PC. I'm trying to use MsiGetProductInfo to query information about that product (actually I need to check if Word is installed).
But the following C++ code always returns with an error 1605 (ERROR_UNKNOWN_PRODUCT) which means that the product appears to be not installed, although it is present in the list of installed applications.
TCHAR szVersion[20];
DWORD cchVersion = 20;
LSTATUS st = MsiGetProductInfo(TEXT("{000209FF-0000-0000-C000-000000000046}"), INSTALLPROPERTY_VERSIONSTRING, szVersion, &cchVersion);
ClassID {000209FF-0000-0000-C000-000000000046} is found in the registry in HKLM\Software\Classes\Word.Application\CLSID and I suppose it should stay for Microsoft Word Application CLSID.
How to use MsiGetProductInfo correctly in order to check that MS Word is installed?