In a command file, commands and/or parameters can be connected with conditions when needed to run or apply them.A condition is labelled with the string "CONDITION".The following operations can be used for getting a verification of validity:
- the values are equal- ("==")
- the values are unequal- („!=“)
- the left value is greater than the right value (">")
- the left value is smaller than the right value ("<")
A dynamic command file processing can be attained by evaluating the environment variables in conditions.
Example
<command name="create partition">
<CONDITION> $ENV:(ImageStep)==2</CONDITION>
<drivenumber>0</drivenumber>
<!—target object is disk 0 -->
<remaining_range>true</remaining_range>
<!-- layout of a partition on the remaining range -->
<driveletter_to_set>D</driveletter_to_set>
<!—set drive letter D -->
<chs_alignment>yes</chs_alignment>
<!—alignment of the new partition on cylinder/head/sector -->
<NTFS>true</NTFS>
<!—create NTFS partition (fix partition type, fix file system for formatting) -->
<format>true</format>
<!—run formatting with fixed file system -->
</command>
In the above example, the command to create a partition will only be run if the value of the environment variable "ImageStep" is equal to the value "2".