Export (0) Print
Expand All
Expand Minimize

MsiEvaluateCondition function

The MsiEvaluateCondition function evaluates a conditional expression containing property names and values.

Syntax


MSICONDITION MsiEvaluateCondition(
  _In_  MSIHANDLE hInstall,
  _In_  LPCTSTR szCondition
);

Parameters

hInstall [in]

Handle to the installation provided to a DLL custom action or obtained through MsiOpenPackage, MsiOpenPackageEx, or MsiOpenProduct.

szCondition [in]

Specifies the conditional expression. This parameter must not be NULL. For the syntax of conditional expressions see Conditional Statement Syntax.

Return value

MSICONDITION_ERROR

An invalid handle was passed to the function, or the conditional expression has a syntax error.

MSICONDITION_FALSE

An expression that evaluates to FALSE was passed to the function.

MSICONDITION_NONE

No expression was passed to the function.

MSICONDITION_TRUE

An expression that evaluates to TRUE was passed to the function.

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.

ValueMeaning
INSTALLSTATE_ABSENTFeature or component not present.
INSTALLSTATE_LOCAL Feature or component on local computer.
INSTALLSTATE_SOURCEFeature or component run from source.
(null value)No action to be taken on feature or component.

 

Requirements

Version

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

Header

Msiquery.h

Library

Msi.lib

DLL

Msi.dll

Unicode and ANSI names

MsiEvaluateConditionW (Unicode) and MsiEvaluateConditionA (ANSI)

See also

Installer Action Functions
Passing Null as the Argument of Windows Installer Functions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft