Tip: Visual Installer's command line parameters


 
Visual Installer's editor (VI.exe) supports some command line parameters. With a command line parameter you can for example open Visual Installer with a specific project file (.VIP file) loaded from start or open Visual Installer in a special (silent) build mode where a setup package is created without any user interaction. The later is very useful if you want to include Visual Installer in a batch build process; Visual Installer can build a setup package automatically and with no user interaction.
  
Visual Installer supports the following command line parameters:

VI.exe <project file> /BUILD /BUILDFOLDER:<folder> /LOG:<log file> /INTERNET or /CD or /USB

Below are all parameters explained in detail:
 
<project file> : A complete file path to a project file (.VIP file). If this parameter is specified, Visual Installer will load the project file when it starts. If the file path contains space characters you should enclose the path with quotes.
  
/BUILD : If this parameter is specified Visual Installer will operate in a special (silent) build mode.
  
/BUILDFOLDER:<folder> : If you want to build the setup package in another folder than specified in the VIP file, you can specify the folder path here.
  
/LOG:<log file> : Errors during build mode can be stored in a log file that you specify here.
  
/INTERNET : If you want to change media type from current project setting to Internet you can specify this parameter.
  
/CD : If you want to change media type from current project setting to CD/DVD you can specify this parameter.
  
/USB : If you want to change media type from current project setting to USB stick you can specify this parameter.
  
  
All folder and file paths that you specify in the command line must be complete, including the drive letter (e.g. "C:\MyProjects\MySetup.vip"). The /BUILDFOLDER, /LOG, /INTERNET, /CD and /USB parameters are only supported if you also specify the /BUILD parameter, otherwise these parameters are ignored. All parameter names (switches) must be entered in uppercase (e.g. "/BUILD"). File and folder paths can be entered in any case.
 
The order of the parameters are also important. They must be entered in the order shown above. For example, the first parameter must be the file path to the project file (.VIP file), the second parameter must always be /BUILD, the third parameter must be /BUILDFOLDER etc.

The /INTERNET, /CD and /USB parameters are mutually exclusive. You can only specify one of them. If you don't specify any of these switches, the project setting for target media is used.
  
    
Note. All versions of Visual Installer support the <project file> parameter that specifies a path to a project file (.VIP file). But the build parameters (e.g. /BUILD) are only supported by the Professional version of Visual Installer.
 
More information about the /BUILD parameter
If you specify the /BUILD parameter in the command line, Visual Installer will be run in a silent build mode. Visual Installer editor's user interface will not be shown and no user interaction is possible. The build mode is very useful if you want to include Visual Installer in batch build processes. When the /BUILD mode parameter is specified, Visual Installer will open the project file, build the setup package and return automatically when finished.
 
Errors can be handled by using the /LOG parameter. If an error occurs during the build mode, VI.exe will return the exit code 1 instead of 0 (VI.exe returns always 0 at success), and a detailed error message is written to the log file.
 
Setup packages are normally build (created) in a folder that is specified in the project file (in the Folder text box in the Create setup package dialog box) but if you want to have your setup package built in another folder you can specify it by using the /BUILDFOLDER command line parameter (e.g. "/BUILDFOLDER:C:\MyCreatedSetups\Setup1"). You can read more on this page.
  
Command Line Examples:
 
Example 1
 
VI.exe C:\MyProjects\MySetup.vip

This is the simplest way to use a command line parameter with Visual Installer. If you specify a path to a project file (.VIP file), the project will be opened automatically when Visual Installer starts.
 
Example 2
 
VI.exe C:\MyProjects\MySetup.vip /BUILD

If you specify the /BUILD parameter together with a path to a project file, the project file will be opened and a setup package created automatically. When the build process is finished, Visual Installer will be closed automatically. No user interface is shown, everything is done invisible.
 
Example 3
 
VI.exe C:\MyProjects\MySetup.vip /BUILD /BUILDFOLDER:C:\MyCreatedSetups\Setup1

If you also specify the /BUILDFOLDER switch together with a folder path, you can have your setup package built (created) in another folder than the creation folder specified in the project file. Additional information is available on this page.
 
Example 4
 
VI.exe C:\MyProjects\MySetup.vip /BUILD /BUILDFOLDER:C:\MyCreatedSetups\Setup1
/LOG:C:\MyLogs\Err.log

When the /BUILD parameter is specified no visual user interface is shown. To discover errors you can specify a path to a log file together with the /LOG switch. If any error occurs during the build process, an error message will be written to the log file. VI.exe will also return the exit code 1 if an error occurs. If the build was successful VI.exe will return 0.
 
Example 5
 
VI.exe C:\MyProjects\MySetup.vip /BUILD /BUILDFOLDER:C:\MyCreatedSetups\Setup1
/LOG:C:\MyLogs\Err.log /INTERNET

In this example we have added the /INTERNET switch (option) to the command line. This will force Visual Installer to set the target media type to Internet, regardless of the setting in the project file. You can also use the /CD and /USB switch in the same way.
 
If neither the /INTERNET, /CD or /USB switches are used in the command line, the target media setting in the project file will be used.
  
Where is VI.exe located?
 
VI.exe is the filename of Visual Installer's editor. VI.exe is installed to the following folder on your system drive: \Program Files\SamLogic\Visual Installer. The drive letter is usually C:.
  
< Tips Index Page
   
Go to Visual Installer product page Visual Installer Tip
 
Only Enterprise Version
 
Requires SamLogic Visual Installer 2022 or later.
SamLogic