Hi All,
I need to search the users' computer to see if some products have been installed. And I use the function MsiGetProductInfo(...) ..I used it like this:
UINT iResult = MsiGetProductInfo(
"{76D6****-****-****-****-************}",
INSTALLPROPERTY_INSTALLEDPRODUCTNAME,
wszProductName, &dwProductName);
if ( ERROR_SUCCESS == iResult )
{
MsiSetProperty( hInstall, "InventorView_EXIST", wszProductName );
}
And I installed 4 product(ALLUser) to test the function.
It works right in 3 products but 1 failed. when I debuged that failed one I found the iResult was set 1605...which means ERROR_UNKNOWN_PRODUCT...The product is unadvertised or uninstalled....But it is not uninstalled!
I searched the abnormal product's ProductCode in registry. In the key--HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall... it contains all infomation of the product (including DisplayName...I think it is the INSTALLPROPERTY_INSTALLEDPRODUCTNAME I try to get)
And then in the "Add/Remove Programs" entry it can be uninstall successfully.
Do any one knows why function MsiGetProductInfo cannot get the information for me?
Thanks in advance?
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
When MsiGetProductInfo cannot get the existed Info
Started by
HermioneJJ
, Mar 29 2006 14:55
2 replies to this topic