Use a script to set the environment

Specify a command script for the application to launch the application.

As an alternative to defining ENVIRONMENT_VARIABLE elements, you can use the DVM element to define a command that will set the environment and launch the application.

On Linux®/UNIX™

Use the DVM element to define a shell that will execute a script specified with the MODULE element:

<APPLICATION Id="kiosk" Parent="defaultgwc"> 
  <EXECUTION> 
    <PATH>/home/f4gl/gep/configfiles/officestoredemo</PATH> 
    <DVM>/bin/sh</DVM> 
    <MODULE>gdc-kiosk.sh</MODULE> 
  </EXECUTION>
</APPLICATION>
  1. PATH element specifies where the script is stored.
  2. DVM element defines the command to execute the shell script defined in MODULE.
  3. MODULE element specifies the shell script file.

On Windows®

Use the DVM element to specify a .bat file, including environment settings and program execution:

<APPLICATION Id="myprog" Parent="defaultgdc">
  <EXECUTION>
    <PATH>$(res.fgldir)/demo</PATH>
    <DVM>c:\myprog\launch.bat</DVM>
  </EXECUTION>
</APPLICATION>
  1. PATH element defines where the script is stored.
  2. DVM element defines the bat file to be executed.