MsiQueryProductStateA function (msi.h)
The MsiQueryProductState function returns the installed state for a product.
Syntax
INSTALLSTATE MsiQueryProductStateA(
[in] LPCSTR szProduct
);
Parameters
[in] szProduct
Specifies the product code that identifies the product to be queried.
Return value
Value | Meaning |
---|---|
|
The product is installed for a different user. |
|
The product is advertised but not installed. |
|
The product is installed for the current user. |
|
An invalid parameter was passed to the function. |
|
The product is neither advertised or installed. |
Remarks
Note
The msi.h header defines MsiQueryProductState as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Installer 5.0 on Windows Server 2012, Windows 8, Windows Server 2008 R2 or Windows 7. Windows Installer 4.0 or Windows Installer 4.5 on Windows Server 2008 or Windows Vista. Windows Installer on Windows Server 2003 or Windows XP. See the Windows Installer Run-Time Requirements for information about the minimum Windows service pack that is required by a Windows Installer version. |
Target Platform | Windows |
Header | msi.h |
Library | Msi.lib |
DLL | Msi.dll |