Published Oct 05, 2016 |
Pre- and Post Check Scripts
News from IGSS Development
The IGSS Development team has introduced a new pre-and Post script option to the Check-and-Install or Check-and-Update procedure when installing changes made in the Definition module to a configuration.
You can now run a script prior to or after the configuration is checked and installed by specifying a path to a script or file to be executed.
The Pre and Post check scripts can be used to copy, move or back-up configuration files, open programs and applications and other automated procedures in conjunction with a check-and-install.
Any script file capable of being executed can be run; for example batch files or executable files (BAT, CMD, PS1, EXE etc) and you can also specify document files or other files which can be opened and run by the operating system such as .pdf, .txt or .docx files.
You can only specify one script per event - one script file to be run prior to a check-and-install and one script file to be run after a check-and-install.
Check-and-Install procedure paused
The Pre- and Posts Check scripts will be opened and executed but not closed unless specified in the script itself.
The check-and-install procedure will be paused while the Pre- and Posts Check scripts are open.
Once the process started by the Pre- and Posts Check scripts has been closed, the check-and-install procedure will continue.
The Pre check script and Post succeeded check script fields on the Application tab on the System Configuration form are used to specify the path and script file to be run prior to and /or after a check-and-install procedure.
The specified scripts or files are specific to the station as the Application tab on the System Configuration form is available for all station types.
For example, you can specify one script to run when checking and installing from an IGSS server and another script to run when checking and installing from an Operator station.
Check Script Variables
You can retrieve and insert information about the check-and-install procedure by using four variables:
You can insert the variables into the path or script/file name and thereby select which script or file is to be executed depending on the values of the variables.
The $Mode variable may contain the values Online or Offline.
If the check-and-install procedure is performed on a running configuration (Check and update), the value Online will be stored in the $Mode variable. Likewise, if the check-and-install procedure is performed on a configuration that is not running (normal Check and install), the value Offline will be stored.
The Mode information may be important because there is a difference in what files are involved in the installation.
- For Offline updates (Normal Check and Install), configuration files in the configuration folder are directly updated.
- For Online updates (Check and update), a temporary copy of the files edited in the Definition module is created in the DefWork folder and the installation process is run on these files. When the installation process has completed, the temporary files will be copied into the configuration folder.
The $CURCONFIG contains the path to your configuration folder.
The $CONFIGNAME variable contains the name of your configuration.
The $INSTCONFIG variable contains the path to your configuration folder or the path to the DefWork folder.
- If you are performing an offline update (Check and install), the variable will contain the path to your configuration folder.
- If you are performing an online update (Check and update), the variable will contain the path to the DefWork folder.
Post succeeded check script: C:\windows\notepad.exe $CURCONFIG\$CONFIGNAME.prt
This post check-and-install script opens the Windows notepad application and displays the installation report generated after the installation.
The check-and-install process will continue after the user closes the notepad application.
Pre check script: C:\$MODE\runme.bat
This pre check-and-install script opens a command prompt and executes the runme.bat script which includes a close command so the check-and-install procedure can continue without having to close the command prompt.
There are two runme .bat script files:
If the configuration is checked and installed while the configuration is shut down, the Runme.bat batch file in the Offline folder will be executed as the $Mode variable will contain the text: Offline.
If the configuration is checked and installed while the configuration is running (an Online Update), the Runme.bat batch file in the Online folder will be executed as the $Mode variable will contain the text: Online.
The new Pre- and Post check script functionality is only available for IGSS 12 after you have updated your IGSS installation.