# $ifte function

$ifte(condition,value1,value2)

The $ifte function ("IF... Then... Else...") evaluates the conditional expression *condition* and returns *value1* if the condition is true, or *value2* if it is false. You can use this function to perform a conditional assignment.

## Parameters

All parameters may contain symbolic references; these are resolved before the function is applied. See **Examples** below.

- condition
- The conditional expression to evaluate. If the expression is very complex, you may have to enclose it in backticks:
*`condition`*to prevent premature interpretation. However, in most cases you can enter the condition as-is. - value1
- The value that must be returned if
**condition**evaluates to true. - value2
- The value that must be returned if
**condition**evaluates to false.

## Examples

Here are some usage examples for this function:

- <$ifte(TsuRunMode = 2, Uninstalling, Installing)>
- Returns
*Uninstalling*if the installer runs in Uninstall mode, or*Installing*otherwise. - <$ifte(<$fverpcmp(<SystemFolder>\mfc42.dll, 6.0)> >= 0, 1, 0)>
- Returns
*1*if the MFC42.dll version is 6.0 or later,*0*otherwise. You use expressions like this one to set a symbol value in a Set Variable action; the resulting symbol can then be used in other conditions. (See the $fverpcmp function for more information about the version comparison.)