VarEquals

Top  Previous  Next

 

The VarEquals condition returns true if the value of the specified Variable matches the specified value

lamp Important: The VarEquals condition can ONLY be used with existing variables that have already been declared in the script. To create a new variable use the Var command.

Command Syntax

 

The Command syntax is the command name, followed by a colon, then the fully qualified path and file name to check:

 

VarEquals:[VariableName],[VariableValue]

 

Parameters:

 

VariableName: The name of the Variable to check

VariableValue: The value to compare

 

Both parameters compulsory as is the comma separating them.

 

Example:

 

[Setup]

Var:FileName = "C:\Temp\My File.txt"

Var:FileSaved,True

 

[Finally]

If:VarEquals,FileSaved,True,DeleteFile:%%FileName%%

 

See Also: NotFileExists DirectoryExists NotDirectoryExists