UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:msi.MsiQueryProductStateW |
MsiQueryProductStateW function (msi.h) |
The MsiQueryProductState function returns the installed state for a product. (Unicode) |
|
setup\msiqueryproductstate.htm |
setup |
f26f3229-d1ce-4802-99b1-857c6501c828 |
12/05/2018 |
MsiQueryProductState, MsiQueryProductState function, MsiQueryProductStateA, MsiQueryProductStateW, _msi_msiqueryproductstate, msi/MsiQueryProductState, msi/MsiQueryProductStateA, msi/MsiQueryProductStateW, setup.msiqueryproductstate |
msi.h |
Windows |
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. |
MsiQueryProductStateW (Unicode) and MsiQueryProductStateA (ANSI) |
Msi.lib |
Msi.dll |
Windows |
19H1 |
|
|
|
|
|
|
The MsiQueryProductState function returns the installed state for a product.
Specifies the product code that identifies the product to be queried.
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. |
Note
The msi.h header defines MsiQueryProductState as an alias which 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 not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.