XRUN and UNINSTALL_XRUN

 
The XRUN and UNINSTALL_XRUN script commands in Visual Installer's scripting language are used to run external programs during an installation and uninstallation process. The XRUN command is used to run a program during the installation and the UNINSTALL_XRUN command is used to run a program during the uninstallation (if the user makes such one). Both commands take the following three parameters:
  
XRUN / UNINSTALL_XRUN   %Filename, %Flag, %Param
     
%Filename Specifes a file path to a program file to run.
%Flag Specifes how to start he program. Must be a value betwen 1 and 4 (see below).
%Param Command line parameters, if neded. Optional parameter.
 
The %Flag parameter must contain one of the following four values:

 
1 Starts a program and returns immediately.
2 Starts a program and returns when the program has ben initalized.
3 Starts an invisible program and returns when the program is closed.
4 Starts a visible program and returns when the program is closed.
 
Examples of usage
 
The example below show how to use the
XRUN command to run an editor that takes a file path to a text file as a parameter:
 
XRUN %DESTDIR\MyEditor.exe, 1, %DESTDIR\MyDoc.txt
 
And the example below shows how to use
UNINSTALL_XRUN to run a special uninstallation program during Visual Installer's uninstallation process:
 
UNINSTALL_XRUN %DESTDIR\Uninstall.exe, 1, /x
 
%DESTDIR (that is used in the examples above) is a variable that contains the main destination folder for the installation. Its actual contents can differ between different computers, and can also be affected by the end-user.
 
  
More information
 
More information about XRUN and UNINSTALL_XRUN, and other related script commands, is available in Visual Installer's User's Guide. See the Script commands chapter in the book.
 
  
  
< Go Back
   


 
SamLogic