MsiEvaluateConditionA function (msiquery.h)
The MsiEvaluateCondition function evaluates a conditional expression containing property names and values.
Syntax
MSICONDITION MsiEvaluateConditionA(
[in] MSIHANDLE hInstall,
[in] LPCSTR szCondition
);
Parameters
[in] hInstall
Handle to the installation provided to a DLL custom action or obtained through MsiOpenPackage, MsiOpenPackageEx, or MsiOpenProduct.
[in] szCondition
Specifies the conditional expression. This parameter must not be NULL. For the syntax of conditional expressions see Conditional Statement Syntax.
Return value
This function returns MSICONDITION.
Remarks
The following table shows the feature and component state values used by the MsiEvaluateCondition function. These states are not set until MsiSetInstallLevel is called, either directly or by the CostFinalize action. Therefore, state checking is generally only useful for conditional expressions in an action sequence table.
Value | Meaning |
---|---|
INSTALLSTATE_ABSENT | Feature or component not present. |
INSTALLSTATE_LOCAL | Feature or component on local computer. |
INSTALLSTATE_SOURCE | Feature or component run from source. |
(null value) | No action to be taken on feature or component. |
Note
The msiquery.h header defines MsiEvaluateCondition 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 |
Target Platform | Windows |
Header | msiquery.h |
Library | Msi.lib |
DLL | Msi.dll |