Scriptinterface Product manual

Scriptinterface 
Environment and template parameter

The command interpreter has been extended with an option for validating environment variables and conditions.
A value included in the string "$ENV:()" is replaced at running time with the value of the environment variable.Similarly at running time, a set environment variable "image_name" with the value "C:\Image20990226.omg" is replaced in the command file by using the string "$ENV:( image_name)" with the value "C:\Image20990226.omg."

The following additional template parameters are available wildcards for use as replacements during the command file procedure.These parameters will be enclosed in the string "$TEMPL:()". The following fixed values are possible:

  • ComputerName: the current name of the Computers
  • UserName: the name of the current user, of the process
  • DefaultPath: the standard path saved in/by the program
  • Day: current date of the operating system
  • Month: current month of the operating system
  • Year: current year of the operating system
  • Hour: current hour of the operating system
  • Minute: current minute of the operating system
  • Second: current second of the operating system
  • Weekday: written day of the week
  • WeekNumber: calendar week number

Example
<command name="restore image">
<image_name>C:Image$TEMPL:(Year)$TEMPL:(Month)$TEMPL:(Day).omg
</image_name>
<!-- dynamic formation of the image name -->
<target_drivenumber>0</target_drivenumber>
<!—target object is disk 0 -->
<image_driveletter>C</image_driveletter>
<!—source object is the Volume/Partition with the drive letter C -->
<chs_alignment>yes</chs_alignment>
<!—alignment of the new partition on cylinder/head/sector -->
<set_bootable_partition_bootable>yes
</set_bootable_partition_bootable>
<!—in case the source object was bootable,set again to bootable -->
<append_on_target_drive>yes</append_on_target_drive>
<!—the partition being restored will be appended in the existing layout,
other partitions will not be overwritten -->
</command>

The file name in the example will become the running time, if the current date would be 26.02.2099, it would be changed into “20990226”.The image file called „image20990226.omg“ found in partition „C:“ would be used for restoration.