If
If
Introduces the statement part for an expression whose conditions yield a logical TRUE. By using conditions, you can adapt an installation package to user requirements, technical conditions, existing constraints and states, and so on.
Several conditions can be linked with AND or OR, NOT is allowed as operator. By nesting conditions, logical links can also be implemented.
All commands that are to be executed in the logical TRUE case of If conditions must be indented.
Note: If the If command is deleted and the request is confirmed, all commands in the If condition block are also deleted. If you need them, copy or move them to another part of your script before deleting them. |
Example:
The following screenshot shows how conditions can be nested and combined with the Boolean operators AND, OR and NOT.
Corresponds to DSM eScript command:
- If
See also:
- $BeginUninstallScript
- Else
- ElseIf
- Exit-Package
- If-Conditions
- Invoke-Goto
- Invoke-PowerShellCode
- Invoke-Script
- Invoke-ScriptAs
- Register-SystemRestart
- Register-SystemShutdown
- Request-EndInstallerSession
- Set-Label
- Start-Program
- Start-ProgramAs
- Stop-PdProcess
- Suspend-ScriptExecution
- Unregister-SystemRestart