Installer - Available Actions


 Category: Control
 
 Change cancel button state
     
Changes the visibility and the enabled state of the cancel button. This action works in GUI mode as well as in unattended mode when the -splash option has been passed on the command line and the simple unattended progress dialog with a cancel button is shown.
Applies to: Installation, Uninstallation
Properties:
  • Button state
    The new button state for the cancel button.
 Run script
     
Runs a custom script. The script must return a boolean value. If it returns false, the installation will be canceled.
Applies to: Installation, Uninstallation
Properties:
  • Script [General]
    The script that will be executed. The script must return a boolean value. If it returns false, the installation will be canceled.
  • Optional Rollback Script [General]
    The script that will be executed in case of a rollback. The return type is void.
 Set a variable
     
Sets a variable by running a custom script. The script can return any java.lang.Object.
Applies to: Installation, Uninstallation
Properties:
  • Script [General]
    The script that will be executed. The script can return any java.lang.Object.
  • Variable name [General]
    The name of the variable that will be set. Enter the variable without the installer prefix and the dollar sign.
  • Only if undefined [General]
    The variable will only be set if it was previously undefined. This is useful for variables that your user can pass via -V or -varfile at the command line.
  • Fail if value is null [General]
    If selected, the action will fail if a null value is returned from the script.
  • Register for response file [General]
    If selected, the variable will be saved to the response file .install4j/response.varfile that is created automatically when the installer exits.This is equivalent to calling context.registerResponseFileVariable(variableName) in a script.

    If the variable is present in the response file, the "Load response file" action in the startup node of the uninstaller will make this variable available in the uninstaller.

 Set messages
     
Sets the messages in the progress interface.
Applies to: Installation, Uninstallation
Properties:
  • Use status [General]
    If the status message should be set.
  • Status message
    The status message.

    Note: This property is only visible if "Use status" is selected.

  • Use detail [General]
    If the detail message should be set.
  • Detail message
    The detail message.

    Note: This property is only visible if "Use detail" is selected.

 Set the progress bar
     
Change the value of the progress bar or set it to indeterminate mode.
Applies to: Installation, Uninstallation
Properties:
  • Type of change
    Change the progress bar either to a percentage value, add progress, set it to indeterminate mode, start a timer, or return from indeterminate mode and show the last percentage value.
  • Percent value
    The progress value from 0 to 100. This property is only used when a percentage value is set or added.

    Note: This property is only visible if "Type of change" is set to one of [Set percentage value, Add percentage value].

  • Timer period
    The time in milliseconds for one percent. This property is only used when the timer is started.

    Note: This property is only visible if "Type of change" is set to "Start a timer".

  • Timer maximum value
    The maximum progress value to be set by the timer. This property is only used when the timer is started.

    Note: This property is only visible if "Type of change" is set to "Start a timer".

 Sleep
     
Sleep a specified number of milliseconds. This is useful to ensure that a progress screen is displayed for at least a certain period of time.
Applies to: Installation, Uninstallation
Properties:
  • Sleep time
    The sleep time in milliseconds.
 Category: Desktop integration
 
 Add a desktop link
     
Create a link on the desktop to an installed executable or file. This action will be automatically reverted by the 'Uninstall files' action.
Applies to: Installation
Properties:
  • Target file
    The installed file or executable for which a link will be created on the desktop
  • Name
    The name of the desktop icon
  • Arguments
    Optional arguments to the executable for Windows and Unix.
  • Icon file [Unix]
    An optional image file (*.png) for the entry. If empty, no icon will be written to the desktop file.
  • Create for all users [Windows]
    If the desktop link should be created for all users. If unselected, the link will be created for the current user only. If a "Create program group" screen is present, the "Create shortcuts for all users" check box will override this property.
  • Icon file [Windows]
    An optional different icon (*.ico) for the link on Windows.
  • Tooltip description [Windows]
    An optional description for Windows that will be displayed in the tooltip.
  • Start in [Windows]
    An optional working directory for the started executable.
  • Run as administrator [Windows]
    If the desktop link should be always run as administrator.
  • Target is Single Bundle [macOS]
    If selected and the media set is a single bundle installer, the desktop icon will point to the bundle instead.
 Add a startup executable on Windows and macOS
     
Add an installed executable to the startup folder on Windows or to the login items on macOS so that it will be started automatically when the user logs in. This action will be automatically reverted by the 'Uninstall files' action.
Applies to: Installation
Properties:
  • Startup executable
    The executable that should be started when the user logs in
  • Entry name [Windows]
    The name of the entry in the startup folder
  • Create for all users [Windows]
    If the startup item should be created for all users. If unselected, the link will be created for the current user only.
  • Set the hide flag [macOS]
    If the hide flag should be set for the login item.
 Add an executable to the dock
     
Add an installed executable to the dock on macOS. This action will be automatically reverted by the 'Uninstall files' action.
Applies to: Installation
Properties:
  • Executable
    The executable that should be added to the dock.
 Create a Windows URL link
     
Create a URL link on Windows. This is a special text file with a .url link that is supported by the Windows desktop, start menu and explorer. To create links in the start menu, the "Create program group" action can be used as well. This action will be automatically reverted by the 'Uninstall files' action.
Applies to: Installation
Properties:
  • URL
    The URL that should be linked to. If no protocol is given, http:// is assumed.
  • Target file
    The path of the URL link, including the name of the link, but without the .url extension. To create a link on the desktop, prefix with ${installer:sys.desktopDir}
  • Icon file
    An optional icon file (*.ico) for the URL link. If empty, the default icon will be used.
  • Use favicon
    If the favicon file of the URL domain should be used. This only works if the icon has been cached by Internet Explorer.
 Create a file association
     
Create an association between a file extension and a launcher, so that the launcher is invoked when the user double-clicks a file with the selected extension.

On Windows, if the application has not yet been started, the arguments to the main method will contain the file name. Subsequent invocations and all invocations on macOS can be intercepted with the com.install4j.api.launcher.StartupNotification class. Only effective on Windows and macOS. This action will be automatically reverted by the 'Uninstall files' action.

Applies to: Installation
Properties:
  • File extension [General]
    The file extension for which the file association should be created. Must not include the leading dot.
  • Description [General]
    A description that is presented to the user as the text next to the corresponding checkbox in the "File associations" screen.
  • Launcher [General]
    The launcher that will be invoked when the file association is invoked by the user.
  • Selected [General]
    If the file association is selected in the "File associations" screen.
  • Execute on Windows [Windows]
    If the file association should be performed on Windows.
  • Icon file for Windows [Windows]
    An optional icon file (*.ico) for the file association on Windows. If empty, a default icon will be used.
  • Additional parameters [Windows]
    Optional additional parameters that will be passed to the executable in front of the file to be opened.
  • Execute on macOS [macOS]
    If the file association should be performed on macOS.
  • Icon file for macOS [macOS]
    An optional icon file (*.icns) for the file association on macOS. If empty, a default icon will be used.
  • Role [macOS]
    The role the application can take for this file type.
  • Restart Finder [macOS]
    If true the Finder should be restarted at the end of the installation. This might be necessary for the icon (and sometimes the association itself) to be picked up immediately. Note that users might find this restart disruptive. Additionally, if you launch an application at the end of the installation, it can be hidden by Finder windows.
 Create program group
     
Create standard program group entries on Windows and freedesktop.org compatible UNIX desktops. This action will be automatically reverted by the 'Uninstall files' action.
Applies to: Installation
Properties:
  • Add default launcher links
    If generated launchers are placed into the program group automatically with their default menu integration properties. You can rename and move the default menu integrations in the program group entries tree. If you delete them, the default menu integration can be enabled again on the "Executable info->Menu integration" step of the launcher wizard.
  • Program group entries

    On Windows, the entries in the program group tree will be created in the start menu by the installer.

    The control buttons allow you to modify the contents of the list of program group entries. You can add new sub-folders and new file links.In the edit dialog, you have to fill in the display name of the program group entry.as wellas the target file for the of the program group link. This has to be a file or directory relative to the distribution root directory. Please note that if you select a directory as the target, it will not "fly out" in the program group, but a separate explorer window will be opened if the user clicks on it. To display all files in a directory, please add all of them as separate program group entries.

    Optionally, you can specify an icon that is used for this program group entry. The icon file must point to an *.ico file. If the file name is relative, it is interpreted as relative to the project file. If you do not specify an icon, the default icon is determined by the system.

  • Create symlinks [Unix]
    If symbolic links for all relevant launchers (those with "menu integration" enabled) should be created on UNIX.
  • Directory for links
    The directory in which links for all relevant launchers (those with "menu integration" enabled) will be created on UNIX.

    Note: This property is only visible if "Create symlinks" is selected.

  • Fail if symlinks are not created
    If selected, the action will fail if the symlinks cannot be created. Usually this is due to missing write permissions which is a common condition, so that the action does not fail by default.

    Note: This property is only visible if "Create symlinks" is selected.

  • Create menu entries [Unix]
    If menu entries should be created on freedesktop.org (KDE, GNOME) systems.
  • Application categories
    The freedesktop.org (KDE, GNOME) application categories used to determine the best place in the applications menu. Multiple categories can be separated by semicolons.

    Note: This property is only visible if "Create menu entries" is selected.

  • Program group name [Windows]
    The default value for the program group where the links will be created. If you leave this property empty, the links will be created at the top level.
  • Create for all users [Windows]
    If the program group is created for all users or only for the current user. If the sys.programGroupAllUsers is set (typically by the "Create program group" screen), the variable value will override this property.
  • Add uninstaller [Windows]
    If the uninstaller should be added to the program group. This has no effect for Windows 8 and higher.
  • Uninstaller menu name
    The name in the program group that will be used for the uninstaller.

    Note: This property is only visible if "Add uninstaller" is selected.

 Create start menu entry
     
Create a single start menu entry on Windows and Unix. For creating multiple program group entries, please see the "Create program group" action. This action will be automatically reverted by the 'Uninstall files' action.
Applies to: Installation
Properties:
  • Entry name
    The entry name in the start menu. On Windows, the name can contain sub-folders with backslashes.
  • Target file
    The installed file or executable for which a start menu entry will be created
  • Arguments
    Optional arguments that should be passed to the executable when started with this entry.
  • Application categories [Unix]
    The freedesktop.org (KDE, GNOME) application categories used to determine the best place in the applications menu. Multiple categories can be separated by semicolons.
  • Icon file [Unix]
    An optional image file (*.png) for the entry. If empty, no icon will be written to the desktop file.
  • Icon file [Windows]
    An optional icon file (*.ico) for the entry. If empty, the default icon will be used.
  • Create for all users [Windows]
    If the program group is created for all users or only for the current user.
  • Program group name [Windows]
    The default value for the program group where the link will be created. If you leave this property empty, the link will be created at the top level.
  • Start in [Windows]
    An optional working directory for the started executable.
  • Run as administrator [Windows]
    If the executable should be always run as administrator.
 Register Add/Remove item
     
Register an Add/Remove item in the Windows software registry. This action will be automatically reverted by the 'Uninstall files' action.
Applies to: Installation
Properties:
  • Item name
    The name of the item that is displayed in the Windows software registry.
  • Icon source
    The source of the icon in in Windows software registry. You can use the icon of the installer or specify a custom .ico file.
  • Icon file
    An optional icon file (*.ico).

    Note: This property is only visible if "Icon source" is set to "Custom icon".

 Category: File operations
 
 Add Windows file rights
     
Adds access rights to files and directories on Windows.

If a helper process with elevated privileges has been created by the "Request privileges" action, this action is pushed to the helper process. Please see the help topic on "Elevation Of Privileges" for more information.

Applies to: Installation, Uninstallation
Properties:
  • Files and directories
    The files and directories whose rights should be modified. In the edit dialog you can choose files from the distribution tree or enter them manually. Files and directories that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate files and directories, this allows you to build a variable length list of files and directories at runtime. The rights for a directory will be inherited by all subdirectories and their contained files.
  • Trustee [Rights]
    The trustee for which the access right should be granted.
  • SID or Account Name
    The SID in String form or the account name for which the access right should be granted.

    Note: This property is only visible if "Trustee" is set to "SID or Account Name".

  • Read [Rights]
    The right to read the object.
  • Write [Rights]
    The right to write to the object.
  • Execute [Rights]
    The right to execute the object.
  • All [Rights]
    All available rights.
 Copy files and directories
     
Copy files and directories. This action will be automatically reverted by the 'Uninstall files' action.
Applies to: Installation, Uninstallation
Properties:
  • Destination directory
    The destination directory. If you have selected a single source file, this can also be a file rather than a directory. The destination directory will not be created, it must exist before this action is executed, otherwise it will be treated as a destination file.
  • Source files or directories
    The files and directories to be copied. In the edit dialog you can choose files from the distribution tree or enter them manually. Files and directories that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate files and directories, this allows you to build a variable length list of files and directories at runtime.
  • File filter script
    The file filter script is invoked for each file that is about to be processed by this action. The script is not invoked for directories. You can return true if the file should be processed or false if it should be excluded from processing.
  • Directory filter script
    The directory filter script is invoked for each directory that is about to be processed by this action. The script is not invoked for files. You can return true if the directory should be processed or false if it should be excluded from processing.
  • Show progress
    If selected, and a progress bar is available on the current screen, the action will show its progress in the progress bar.
  • Show file names
    If selected, the names of the files that are processed will be shown during the installation.

    Note: This property is only visible if "Show progress" is selected.

  • Resolve relative file in
    A relative destination file can be resolved against the installation directory or against the root of the temporarily extracted archive.
  • Resolve relative files in
    Relative files can be resolved against the installation directory or against the root of the temporarily extracted archive.
  • Overwrite mode
    How to handle an existing destination file.
  • Uninstall mode
    The mode how the uninstaller should handle the files created with this action.
  • Access mode [Unix]
    The UNIX access mode for files.
  • Directory access mode [Unix]
    The UNIX access mode for directories.
  • Shared file [Windows]
    If created files should be registered as a shared files.
  • Delay if necessary [Windows]
    If selected and a destination file cannot be replaced, the operation will be scheduled for the next reboot. The context method isRebootRequired() will return true in this case.
  • Trigger reboot if required [Windows]
    If selected and the operation is delayed until reboot, the user will be asked for a reboot automatically at the end of installation.
 Create a symbolic link
     
Creates a symbolic link. This action has no effect on Windows.
Applies to: Installation, Uninstallation
Properties:
  • File
    The file or directory that the symbolic link should point to.
  • Link file
    The link file that should be created. Relative files will be resolved relative to the installation directory.
  • Remove on uninstall
    If the link should be deleted by the 'Uninstall files' action in the uninstaller.
 Delete files and directories
     
Deletes files and directory. Directories can be deleted recursively.
Applies to: Installation, Uninstallation
Properties:
  • Files and directories
    The files and directories to be deleted. In the edit dialog you can choose files from the distribution tree or enter them manually. Files and directories that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate files and directories, this allows you to build a variable length list of files and directories at runtime.
  • File filter script
    The file filter script is invoked for each file that is about to be processed by this action. The script is not invoked for directories. You can return true if the file should be processed or false if it should be excluded from processing.
  • Directory filter script
    The directory filter script is invoked for each directory that is about to be processed by this action. The script is not invoked for files. You can return true if the directory should be processed or false if it should be excluded from processing.
  • Recursive
    If selected, the operation will be performed recursively on directories.
  • Backup for rollback
    If selected, a backup of the files to be deleted will be made and restored in case of rollback.
 Move files and directories
     
Moves files and directories. The newly created files are subject to removal by the 'Uninstall files' action.
Applies to: Installation, Uninstallation
Properties:
  • Destination directory
    The destination directory. If you have selected a single source file, this can also be a file rather than a directory. The destination directory will not be created, it must exist before this action is executed, otherwise it will be treated as a destination file.
  • Source files or directories
    The files and directories to be moved. In the edit dialog you can choose files from the distribution tree or enter them manually. Files and directories that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate files and directories, this allows you to build a variable length list of files and directories at runtime.
  • File filter script
    The file filter script is invoked for each file that is about to be processed by this action. The script is not invoked for directories. You can return true if the file should be processed or false if it should be excluded from processing.
  • Directory filter script
    The directory filter script is invoked for each directory that is about to be processed by this action. The script is not invoked for files. You can return true if the directory should be processed or false if it should be excluded from processing.
  • Show progress
    If selected, and a progress bar is available on the current screen, the action will show its progress in the progress bar.
  • Show file names
    If selected, the names of the files that are processed will be shown during the installation.

    Note: This property is only visible if "Show progress" is selected.

  • Resolve relative file in
    A relative destination file can be resolved against the installation directory or against the root of the temporarily extracted archive.
  • Resolve relative files in
    Relative files can be resolved against the installation directory or against the root of the temporarily extracted archive.
  • Overwrite mode
    How to handle an existing destination file.
  • Uninstall mode
    The mode how the uninstaller should handle the files created with this action.
  • Access mode [Unix]
    The UNIX access mode for files.
  • Directory access mode [Unix]
    The UNIX access mode for directories.
  • Shared file [Windows]
    If created files should be registered as a shared files.
  • Delay if necessary [Windows]
    If selected and a destination file cannot be replaced, the operation will be scheduled for the next reboot. The context method isRebootRequired() will return true in this case.
  • Trigger reboot if required [Windows]
    If selected and the operation is delayed until reboot, the user will be asked for a reboot automatically at the end of installation.
 Set the UNIX access mode of files and directories
     
Sets the UNIX access mode of files and directories. This action has no effect on Windows.
Applies to: Installation, Uninstallation
Properties:
  • Files and directories
    The files and directories that the access mode should be set for. In the edit dialog you can choose files from the distribution tree or enter them manually. Files and directories that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate files and directories, this allows you to build a variable length list of files and directories at runtime.
  • File filter script
    The file filter script is invoked for each file that is about to be processed by this action. The script is not invoked for directories. You can return true if the file should be processed or false if it should be excluded from processing.
  • Directory filter script
    The directory filter script is invoked for each directory that is about to be processed by this action. The script is not invoked for files. You can return true if the directory should be processed or false if it should be excluded from processing.
  • Recursive
    If selected, the operation will be performed recursively on directories.
  • Mode
    The mode to be set. This can be an octal mode like 750 or a symbolic mode that can be used with chmod, like u+x. For the permission flags in the symbolic mode, only rwxugo are supported.
  • Perform on
    The type of file this action should be performed on.
 Set the modification time of files
     
Sets the modification time of files.
Applies to: Installation, Uninstallation
Properties:
  • Files and directories
    The files and directories that the modification time should be set for. In the edit dialog you can choose files from the distribution tree or enter them manually. Files and directories that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate files and directories, this allows you to build a variable length list of files and directories at runtime.
  • File filter script
    The file filter script is invoked for each file that is about to be processed by this action. The script is not invoked for directories. You can return true if the file should be processed or false if it should be excluded from processing.
  • Directory filter script
    The directory filter script is invoked for each directory that is about to be processed by this action. The script is not invoked for files. You can return true if the directory should be processed or false if it should be excluded from processing.
  • Recursive
    If selected, the operation will be performed recursively on directories.
  • Time
    The new modification time.
 Set the owner of files and directories
     
Sets the owner and optionally the group of files and directories. This action has no effect on Windows.
Applies to: Installation, Uninstallation
Properties:
  • Files and directories
    The files and directories that the owner should be set for. In the edit dialog you can choose files from the distribution tree or enter them manually. Files and directories that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate files and directories, this allows you to build a variable length list of files and directories at runtime.
  • File filter script
    The file filter script is invoked for each file that is about to be processed by this action. The script is not invoked for directories. You can return true if the file should be processed or false if it should be excluded from processing.
  • Directory filter script
    The directory filter script is invoked for each directory that is about to be processed by this action. The script is not invoked for files. You can return true if the directory should be processed or false if it should be excluded from processing.
  • Recursive
    If selected, the operation will be performed recursively on directories.
  • Owner
    The owner to be set. If you want to set the group, too, please add it with a colon (example: user:group). To only change the group, prefix the group name with a colon (example: :group).
 Category: Final options
 
 Execute launcher
     
Execute an installed launcher and return immediately. This action is intended to be placed on the "Finish" screen. A confirmation can be added automatically to the "Finish" screen.

If the main installation process has been elevated by the "Request privileges" action, this action is pushed to the original process with limited rights. Please see the help topic on "Elevation Of Privileges" for more information.

Applies to: Installation
Properties:
  • Launcher
    The launcher that will be executed. Service launchers are not shown.
  • Arguments
    The arguments passed to the launcher. Please note that in the edit dialog, each argument starts on a new line. Arguments that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate arguments, this allows you to build a variable length list of arguments at runtime.
 Open PDF viewer
     
Displays a PDF file in a cross-platform PDF viewer. A separate window will be opened.
Applies to: Installation, Uninstallation
Properties:
  • Dialog title
    The title of the PDF viewer dialog.
  • PDF file [PDF]
    The PDF file that should be displayed.
 Reboot computer
     
Reboot the computer on Windows and macOS. This action will trigger a reboot that takes place at the end of installation or uninstallation. By default, the user will be asked whether to reboot or not.
Applies to: Installation, Uninstallation
Properties:
  • Ask user
    Ask the user whether the reboot should be performed or not.
 Show URL
     
Show a URL in the default browser. This action is intended to be placed on the "Finish" or the "Uninstallation success" screen.

If the main installation process has been elevated by the "Request privileges" action, this action is pushed to the original process with limited rights. Please see the help topic on "Elevation Of Privileges" for more information.

Applies to: Installation, Uninstallation
Properties:
  • URL
    The URL that will be shown.
 Show file
     
Show a file with the associated application. Usually, a text file or an HTML file is appropriate. This action is intended to be placed on the "Finish" screen. A confirmation can be added automatically to the "Finish" screen.

If the main installation process has been elevated by the "Request privileges" action, this action is pushed to the original process with limited rights. Please see the help topic on "Elevation Of Privileges" for more information.

Applies to: Installation
Properties:
  • File
    The file that will be shown.
 Category: HTTP and network
 
 Download file
     
Download a URL and save it to a file
Applies to: Installation, Uninstallation
Properties:
  • URL
    The URL from which the file should be downloaded. The URL must start with http:// or https://. If you add a query string, it must already be URL encoded.
  • Target file
    The file to which the downloaded URL will be saved.
  • Request headers
    A list of name-value pairs that should be set as additional headers for the request.

    Request headers that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate request headers, this allows you to build a variable length list of request headers at runtime.

  • Retry if interrupted
    If selected, ask the user to retry if a successfully started download is interrupted.
  • Check for md5sums
    If selected, the action will try to download a file named md5sums from either the directory of the above URL or from the optional URL given below. If the download is successful and the file contains an entry for the target file name, it will be checked. If the MD5 checksums do not match and the "Silent failure" option is not selected, a dialog will be shown that offers the possibility to retry the download.
  • Optional md5sums URL
    An optional URL for the md5ums file. If specified, only this URL will be used.

    Note: This property is only visible if "Check for md5sums" is selected.

  • Silent failure
    If selected, the action will fail immediately if a mismatch in the MD5 checksums occurs. Otherwise the user will be presented with a dialog box that explains the failure and offers the possibility to retry the download.

    Note: This property is only visible if "Check for md5sums" is selected.

  • Show progress
    If selected, and a progress bar is available on the current screen, the action will show its progress in the progress bar.
  • Show file name
    If selected, the name of the downloaded file and the target directory will be displayed. This setting has no effect if "Show progress" is not selected.

    Note: This property is only visible if "Show progress" is selected.

  • Delete downloaded file on exit
    If selected, the downloaded file will be deleted when the installer application terminates.
  • Ask for proxy if necessary [Error Handling]
    At first, the connection is attempted with the proxy information that is set for the default browser. If that fails, and this property is selected, a proxy dialog will be shown where the user can configure the proxy that should be used to connect to the web server.
  • Network failure script [Error Handling]
    A script that is executed if the HTTP connection fails in such a way, that the proxy dialog would have to be shown. If you return ErrorHandlingMode.IGNORE, the regular proxy or failure handling will proceed, if you return ErrorHandlingMode.CANCEL, the action will fail immediately. If you can take corrective action in the script, you can return ErrorHandlingMode.RETRY to make the same HTTP request again. However, you have to take special care not to enter an infinite loop. Typically, there should be user input before you retry and the user should be given the option to cancel.

    The script is only executed for actual network failures, and not if the server or the proxy connection require authentication.

  • Accept all SSL certificates [Error Handling]
    If the protocol of the URL starts with "https" and this property is selected, the SSL certificate will not be checked for validity. This is only recommended for testing purposes when working with self-signed certificates.
  • Connect timeout [Error Handling]
    The timeout for establishing the socket connection in milliseconds. A timeout of zero is interpreted as an infinite timeout.
  • Read timeout [Error Handling]
    The timeout for reading data from the socket connection in milliseconds. A timeout of zero is interpreted as an infinite timeout.
  • Show error message [Error Handling]
    Show a default error message if the download fails.
 HTTP request
     
Make an HTTP request to a specified URL. All common HTTP request methods are supported for REST calls. For mime types starting with text or containing "charset" information, the response body can be saved to an installer variable. To download large files, use the "Download file" action instead.

The action will succeed if a HTTP response code in the 2xx range is received, otherwise it will fail. You can save the response code to a variable to inspect it in a later action.

Applies to: Installation, Uninstallation
Properties:
  • Ask for proxy if necessary [Error Handling]
    At first, the connection is attempted with the proxy information that is set for the default browser. If that fails, and this property is selected, a proxy dialog will be shown where the user can configure the proxy that should be used to connect to the web server.
  • Network failure script [Error Handling]
    A script that is executed if the HTTP connection fails in such a way, that the proxy dialog would have to be shown. If you return ErrorHandlingMode.IGNORE, the regular proxy or failure handling will proceed, if you return ErrorHandlingMode.CANCEL, the action will fail immediately. If you can take corrective action in the script, you can return ErrorHandlingMode.RETRY to make the same HTTP request again. However, you have to take special care not to enter an infinite loop. Typically, there should be user input before you retry and the user should be given the option to cancel.

    The script is only executed for actual network failures, and not if the server or the proxy connection require authentication.

  • Accept all SSL certificates [Error Handling]
    If the protocol of the URL starts with "https" and this property is selected, the SSL certificate will not be checked for validity. This is only recommended for testing purposes when working with self-signed certificates.
  • Connect timeout [Error Handling]
    The timeout for establishing the socket connection in milliseconds. A timeout of zero is interpreted as an infinite timeout.
  • Read timeout [Error Handling]
    The timeout for reading data from the socket connection in milliseconds. A timeout of zero is interpreted as an infinite timeout.
  • URL [Request]
    The URL for the HTTP request. The URL must start with http:// or https://. If you add a query string, it must already be URL encoded.

    To post a query string with URL-encoded key-value pairs, use the "Form data" property instead of adding the query string here.

  • HTTP request method [Request]
    The request method for the HTTP protocol can be one of GET, POST, HEAD, OPTIONS, PUT, DELETE, TRACE. For POST and PUT, the values entered in the "Form data" property are transmitted in the HTTP message body with the mime type "application/x-www-form-urlencoded". For other request methods, the data is appended as a query string to the URL.
  • Custom request body
    If selected, a custom request body is sent. For form data, use the "Form data" property instead. If both form data and a custom request body are present, the form data is appended to the URL.

    Note: This property is only visible if "HTTP request method" is set to one of [POST, PUT].

  • Content type
    The content type of the request body. For JSON, use application/json.

    Note: This property is only visible if "Custom request body" is selected.

  • Request body
    The request body as a string.

    Note: This property is only visible if "Custom request body" is selected.

  • Form data [Request]
    A list of key-value pairs that should be transmitted with this request. Depending on the request method, they are either appended as a query string to the URL or transmitted in the HTTP message body.

    Key-value pairs that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate key-value pairs, this allows you to build a variable length list of key-value pairs at runtime.

  • Request headers [Request]
    A list of name-value pairs that should be set as additional headers for the request.

    Request headers that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate request headers, this allows you to build a variable length list of request headers at runtime.

  • Perform rollback request [Request]
    If selected, a request is performed in case of a rollback. You can configure the rollback request with the child properties. All other properties, such as error handling are shared with the regular request.
  • Rollback URL
    The URL for the rollback request. The URL must start with http:// or https://. If you add a query string, it must already be URL encoded.

    Note: This property is only visible if "Perform rollback request" is selected.

  • Rollback HTTP request method
    The request method for the HTTP protocol can be one of GET, POST, HEAD, OPTIONS, PUT, DELETE, TRACE. For POST and PUT, the values entered in the "Form data" property are transmitted in the HTTP message body with the mime type "application/x-www-form-urlencoded". For other request methods, the data is appended as a query string to the URL.

    Note: This property is only visible if "Perform rollback request" is selected.

  • Custom request body
    If selected, a custom request body is sent. For form data, use the "Form data" property instead. If both form data and a custom request body are present, the form data is appended to the URL.

    Note: This property is only visible if "Rollback HTTP request method" is set to one of [POST, PUT].

  • Content type
    The content type of the request body. For JSON, use application/json.

    Note: This property is only visible if "Custom request body" is selected.

  • Request body
    The request body as a string.

    Note: This property is only visible if "Custom request body" is selected.

  • Rollback form data
    A list of key-value pairs that should be transmitted with this request. Depending on the request method, they are either appended as a query string to the URL or transmitted in the HTTP message body.

    Key-value pairs that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate key-value pairs, this allows you to build a variable length list of key-value pairs at runtime.

    Note: This property is only visible if "Perform rollback request" is selected.

  • Variable name for response body [Response]
    Optionally, you can enter a variable name that will be set with the text of the response body as an instance of java.lang.String. The variable value will not be written to the log file.Enter the variable without the installer prefix and the dollar sign.

    The variable will not be set if the mime type does not start with text/ or contain "charset" information.

  • Variable name for response code [Response]
    Optionally, you can enter a variable name that will be set with the response code as an instance of java.lang.Integer. Enter the variable without the installer prefix and the dollar sign.
  • Variable name for response headers [Response]
    Optionally, you can enter a variable name that will be set with the response headers as an instance of java.util.Map. The keys in the map are the header names, and the values are instances of java.util.List<String> with the header values. The variable value will not be written to the log file.Enter the variable without the installer prefix and the dollar sign.
 Upload file
     
Upload a file to an HTTP server with a POST request.
Applies to: Installation, Uninstallation
Properties:
  • File
    The file that will be uploaded.
  • URL
    The URL to which the file should be uploaded. The URL must start with http:// or https://. If you add a query string, it must already be URL encoded.
  • Request headers
    A list of name-value pairs that should be set as additional headers for the request.

    Request headers that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate request headers, this allows you to build a variable length list of request headers at runtime.

  • Retry if interrupted
    If selected, ask the user to retry if a successfully started upload is interrupted.
  • Show progress
    If selected, and a progress bar is available on the current screen, the action will show its progress in the progress bar.
  • Show file name
    If selected, the name of the uploaded file and the target directory will be displayed. This setting has no effect if "Show progress" is not selected.

    Note: This property is only visible if "Show progress" is selected.

  • Ask for proxy if necessary [Error Handling]
    At first, the connection is attempted with the proxy information that is set for the default browser. If that fails, and this property is selected, a proxy dialog will be shown where the user can configure the proxy that should be used to connect to the web server.
  • Network failure script [Error Handling]
    A script that is executed if the HTTP connection fails in such a way, that the proxy dialog would have to be shown. If you return ErrorHandlingMode.IGNORE, the regular proxy or failure handling will proceed, if you return ErrorHandlingMode.CANCEL, the action will fail immediately. If you can take corrective action in the script, you can return ErrorHandlingMode.RETRY to make the same HTTP request again. However, you have to take special care not to enter an infinite loop. Typically, there should be user input before you retry and the user should be given the option to cancel.

    The script is only executed for actual network failures, and not if the server or the proxy connection require authentication.

  • Accept all SSL certificates [Error Handling]
    If the protocol of the URL starts with "https" and this property is selected, the SSL certificate will not be checked for validity. This is only recommended for testing purposes when working with self-signed certificates.
  • Connect timeout [Error Handling]
    The timeout for establishing the socket connection in milliseconds. A timeout of zero is interpreted as an infinite timeout.
  • Read timeout [Error Handling]
    The timeout for reading data from the socket connection in milliseconds. A timeout of zero is interpreted as an infinite timeout.
 Wait for HTTP server
     
Wait until an HTTP or HTTPS port becomes available. This is useful if you start a server, for example with a "Start a service" action, and need to wait until the server is operational before proceeding with the installation.
Applies to: Installation, Uninstallation
Properties:
  • URL
    The URL that should be checked. The URL must start with http:// or https://. If you add a query string, it must already be URL encoded.
  • Timeout
    The timeout in seconds. After this timeout, the action will give up waiting for the HTTP port and fail. A timeout of 0 or a negative value means that the action will wait indefinitely for the HTTP port.
  • Set indeterminate progress
    If selected, the progress bar will be set to indeterminate mode while the action is running. Note that this only has an effect if a progress bar is available on the current screen.
  • Accept all response codes
    If selected, all response codes returned by the HTTP server will by accepted for the action to succeed. Otherwise, the action will continue to wait for a 2xx response code.
  • Variable name for response code
    If set, the response code will be saved to this installer variable. The variable will only be set in case of success. If the action fails, it always fails due to the timeout and there is no associated response code.
 Wait for Socket
     
Wait until a socket can be connected to. This is useful if you start a non-HTTP server. For HTTP and HTTPS, use the "Wait for HTTP server" action instead.
Applies to: Installation, Uninstallation
Properties:
  • URL
    The host on which the server socket should be checked. Can be a host name or an IP address.
  • Port
    The port on which the server socket should be checked.
  • Timeout
    The timeout in seconds. After this timeout, the action will give up waiting for the HTTP port and fail. A timeout of 0 or a negative value means that the action will wait indefinitely for the HTTP port.
  • Set indeterminate progress
    If selected, the progress bar will be set to indeterminate mode while the action is running. Note that this only has an effect if a progress bar is available on the current screen.
 Category: JDBC
 
 Check JDBC connection
     
Check if a connection can be made to the configured JDBC database. If no connection can be made, the action will fail. If the action is attached to a form screen that queries a database location, set its "Error message" property to an appropriate error message and the "Failure strategy" property to "Return to the parent screen".
Applies to: Installation, Uninstallation
Properties:
  • Use a custom SQL query
    By default, the action executes "select 1 from dual" for Oracle databases and "select 1" for other database. If you would like to use another statement, select this property.
  • Custom SQL query
    An SQL query that returns at least one row. If the statement fails or of it returns zero rows, the action will fail.

    Note: This property is only visible if "Use a custom SQL query" is selected.

  • JDBC Driver class name [Connection]
    The class name of the JDBC driver. The JDBC driver JAR file must be added to the "Installer->Custom code & Resources" step.
  • JDBC URL [Connection]
    The JDBC URL that will be used to connect to the database. For example, to connect to a MySQL database named "test" and installed locally, the connection string is jdbc:mysql://localhost/test.
  • User [Connection]
    The user name for connecting to the database. Can be empty if no user name is required.
  • Password [Connection]
    The password for connecting to the database. Can be empty if no password is required.
  • Additional JDBC properties [Connection]
    Additional properties for configuring the JDBC driver. Property definitions that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate property definitions, this allows you to build a variable length list of property definitions at runtime.
  • Variable name for error messages [Connection]
    The name of the variable that will be set with the error messages that were logged during the execution of the action. There may be multiple error messages in the order of occurrence, each error message starts on a new line. If no error occurred, the variable will be set to the empty string.

    Enter the variable without the installer prefix and the dollar sign.

 Execute SQL query
     
Execute a single SQL query and store the result in an installer variable. If only the first row is taken, the row value is stored directly, otherwise the variable will contain an instance of java.util.List with the row values. If the query is for a single column, the row value is the Java object representation of the return type, e.g. java.lang.String for VARCHAR or java.lang.Long for INT.
Applies to: Installation, Uninstallation
Properties:
  • JDBC Driver class name [Connection]
    The class name of the JDBC driver. The JDBC driver JAR file must be added to the "Installer->Custom code & Resources" step.
  • JDBC URL [Connection]
    The JDBC URL that will be used to connect to the database. For example, to connect to a MySQL database named "test" and installed locally, the connection string is jdbc:mysql://localhost/test.
  • User [Connection]
    The user name for connecting to the database. Can be empty if no user name is required.
  • Password [Connection]
    The password for connecting to the database. Can be empty if no password is required.
  • Additional JDBC properties [Connection]
    Additional properties for configuring the JDBC driver. Property definitions that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate property definitions, this allows you to build a variable length list of property definitions at runtime.
  • SQL query [SQL execution]
    The SQL query. For example, select count(*) from customers will return a single row with a single column. To get the integer result directly in the installer variable, you also have to select the "Take first row only" property, otherwise a List<Object> with one element will be stored in the variable.

    For queries that return multiple rows, like select first_name, last_name from customer, each row is stored as an instance of List<Object>. If "Take first row only" is selected, the variable will contain that list, otherwise it will contain an instance of List<List<Object>> with the entire table of the result set.

  • Take first row only [SQL execution]
    If selected, the result will at most consist of a single row. If the result has only one column, the cell value will be stored directly in the installer variable, otherwise a List<Object> with all column values will be stored. Also, if no row is returned, the installer variable will be set to null.

    If not selected, the result will be a List<Object> for a single column and a List<List<Object>> for multiple columns.

  • Fail if zero rows returned [SQL execution]
    If selected, and zero rows are returned, the action will fail, and the installer variable will not be changed.
  • Variable name for result [SQL execution]
    The name of the variable that will be set with the result of the query as explained in the descriptions of the "SQL query" and the "Take first row only" properties. Enter the variable without the installer prefix and the dollar sign, or leave empty if the error message should not be saved.
  • Variable name for error messages [SQL execution]
    The name of the variable that will be set with the error messages that were logged during the execution of the action. There may be multiple error messages in the order of occurrence, each error message starts on a new line. If no error occurred, the variable will be set to the empty string.

    Enter the variable without the installer prefix and the dollar sign.

 Execute SQL script
     
Execute a single SQL statement or a script of SQL statements.
Applies to: Installation, Uninstallation
Properties:
  • JDBC Driver class name [Connection]
    The class name of the JDBC driver. The JDBC driver JAR file must be added to the "Installer->Custom code & Resources" step.
  • JDBC URL [Connection]
    The JDBC URL that will be used to connect to the database. For example, to connect to a MySQL database named "test" and installed locally, the connection string is jdbc:mysql://localhost/test.
  • User [Connection]
    The user name for connecting to the database. Can be empty if no user name is required.
  • Password [Connection]
    The password for connecting to the database. Can be empty if no password is required.
  • Additional JDBC properties [Connection]
    Additional properties for configuring the JDBC driver. Property definitions that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate property definitions, this allows you to build a variable length list of property definitions at runtime.
  • Script source [Script Execution]
    You can either enter the SQL statements directly in the install4j IDE, or read a file that contains the SQL script. In both cases, installer variables will be replaced.
  • SQL script
    Either a single SQL statement or a sequence of statements separated by the configured delimiter. Installer variables will be replaced before the execution. If no delimiter is found, the entire input is treated as a single SQL statement.

    Note: This property is only visible if "Script source" is set to "Direct entry".

  • SQL script file
    A file containing the SQL script, either a single SQL statement or a sequence of statements separated by the configured delimiter. Installer variables will be replaced before the execution.The file may also be gzipped (with the Unix gzip command line utility), the action will then automatically decompress the file on the fly.

    Note: This property is only visible if "Script source" is set to "Read from file".

  • Encoding
    The encoding of the file. If you leave this empty the system default will be used. Common encodings are UTF-8, UTF-16, ISO-8859-1.

    Note: This property is only visible if "Script source" is set to "Read from file".

  • Statement delimiter [Script Execution]
    A regular expression that separates SQL statements. To match line breaks, enter \n. If the delimited contains characters that have a special meaning in regular expressions, you have to quote them, like in \. for a literal dot.
  • Commit each statement [Script Execution]
    If selected, each SQL statement will be committed separately. Otherwise, the entire script will be committed at the end. If the script contains a single statement, the setting has no effect.
  • Ignore errors [Script Execution]
    If selected, errors from single SQL statements will be ignored, and processing will not be stopped. Otherwise, processing stops at the first error and a database rollback will be performed unless "Commit each statement" is selected.
  • Variable name for error messages [Script Execution]
    The name of the variable that will be set with the error messages that were logged during the execution of the action. There may be multiple error messages in the order of occurrence, each error message starts on a new line. If no error occurred, the variable will be set to the empty string.

    Enter the variable without the installer prefix and the dollar sign.

 JDBC container action
     
This action allows you to configure connection properties just once and then execute a list of JDBC actions with the same connection.
Applies to: Installation, Uninstallation
Properties:
  • JDBC actions
    The JDBC actions that should be executed run with the same connection.
  • JDBC Driver class name [Connection]
    The class name of the JDBC driver. The JDBC driver JAR file must be added to the "Installer->Custom code & Resources" step.
  • JDBC URL [Connection]
    The JDBC URL that will be used to connect to the database. For example, to connect to a MySQL database named "test" and installed locally, the connection string is jdbc:mysql://localhost/test.
  • User [Connection]
    The user name for connecting to the database. Can be empty if no user name is required.
  • Password [Connection]
    The password for connecting to the database. Can be empty if no password is required.
  • Additional JDBC properties [Connection]
    Additional properties for configuring the JDBC driver. Property definitions that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate property definitions, this allows you to build a variable length list of property definitions at runtime.
 Category: Java preference store
 
 Delete a node or key in the Java preference store
     
Delete an entire package node or a key-value pair in the Java preference store.
Applies to: Installation, Uninstallation
Properties:
  • Package name
    The name of the package node in the preference store that should be deleted or contains the key-value pair to be deleted. The action does not return an error if this package node does not exist.

    For your convenience, install4j replaces "." with "/" and "_" with "-" in package names to make it possible to use the package syntax rather than the path syntax. If you do not want these characters to be replaced, you have to prefix them with a backslash, like "\."

  • Key
    The key that should be deleted. If you leave this empty, the entire package node will be deleted instead. The action does not return an error if this key does not exist.
  • Preference root
    If you want to delete the node or key-value pair for the current user, all users, or both.
  • Only if empty
    If a node should only be deleted when it contains no sub-nodes or keys.
 Load installer variables from the Java preference store
     
Load installer variables from the Java preference store that have been previously saved by the "Save installer variables to the Java preference store" action.
Applies to: Installation, Uninstallation
Properties:
  • Package name
    The name of the package node in the preference store where the installer variables should be loaded from. By default, this is set to the application ID.

    For your convenience, install4j replaces "." with "/" and "_" with "-" in package names to make it possible to use the package syntax rather than the path syntax. If you do not want these characters to be replaced, you have to prefix them with a backslash, like "\."

  • Preference root
    If you want to load the installer variables for the current user, all users, or first read the settings for all users and then override with the user-specific settings.
 Read a key from the Java preference store
     
Read the value of a key from the Java preference store and save it to an installer variable. Only string values can be read.
Applies to: Installation, Uninstallation
Properties:
  • Package name
    The name of the package node in the preference store where the key is located.

    For your convenience, install4j replaces "." with "/" and "_" with "-" in package names to make it possible to use the package syntax rather than the path syntax. If you do not want these characters to be replaced, you have to prefix them with a backslash, like "\."

  • Key
    The key whose value should be read.
  • Use a default value
    If selected, a default value will be saved to the variable if the key cannot be found in the preference store. Otherwise a missing key will result in the failure of the action and the variable will not be set.
  • Default value
    The default value that will be used if the key cannot be found in the preference store.

    Note: This property is only visible if "Use a default value" is selected.

  • Preference root
    If you want to read the value of the key for the current user, all users, or first read the settings for all users and then override with the user-specific settings.
  • Variable name
    The name of the variable that will be set with the string value. Enter the variable without the installer prefix and the dollar sign. If the key cannot be found in the preference store, the variable value will not be set.
 Save installer variables to the Java preference store
     
Save installer variables to the Java preference store. This can be used to communicate installer variables to the uninstaller or to installers with different application IDs.
Applies to: Installation, Uninstallation
Properties:
  • Package name
    The name of the package node in the preference store where the installer variables should be set. By default, this is set to the application ID.

    For your convenience, install4j replaces "." with "/" and "_" with "-" in package names to make it possible to use the package syntax rather than the path syntax. If you do not want these characters to be replaced, you have to prefix them with a backslash, like "\."

  • Preference root
    If you want to save the installer variables for the current user only or for all users. Due to access rights it can happen that the system preference registry is not writable, in that case a fallback to the user specific registry can be tried.
  • Installer variable names
    A list of installer variable names. Just enter the names of the installer variables, not including the surrounding ${installer:...} syntax used for variable substitution in text fields. Variables with value null will be ignored. In the edit dialog, you have to enter one item per line. Entries that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate entries, this allows you to build a variable length list of entries at runtime.
 Set a key in the Java preference store
     
Set a key-value pair in the Java preference store. The package node is created if necessary. This is the most convenient way to communicate settings to related installers. Only string values can be set.
Applies to: Installation, Uninstallation
Properties:
  • Package name
    The name of the package node in the preference store where the key-value pair should be set.

    For your convenience, install4j replaces "." with "/" and "_" with "-" in package names to make it possible to use the package syntax rather than the path syntax. If you do not want these characters to be replaced, you have to prefix them with a backslash, like "\."

  • Key
    The key for which a value should be set.
  • Value
    The string value that should be set for the key.
  • Preference root
    If you want to set the key for the current user only or for all users. Due to access rights it can happen that the system preference registry is not writable, in that case a fallback to the user specific registry can be tried.
 Category: Miscellaneous
 
 Add VM options
     
Adds VM options for a launcher by modifying or creating a .vmoptions file or by changing the Info.plist file. This action will be automatically reverted by the 'Uninstall files' action.
Applies to: Installation
Properties:
  • Launcher
    The launcher that the VM options should be added for.
  • VM options
    The unquoted options that should be added. Note that system property definitions must be prefixed with -D just as on the command line, e.g. -Dkey=value. In the edit dialog, you have to enter one item per line. VM options that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate VM options, this allows you to build a variable length list of VM options at runtime.
  • Target file on macOS [macOS]
    For application bundles on macOS, there are two locations for .vmoptions files. One in the "Contents" directory inside the application bundle, and the other next to the application bundle. Both files are read by the launcher, but the contained file takes precedence. If the launcher is signed, you should choose the location next to the application bundle, otherwise the signature will be broken. If the target is a contained command line executable, this property is ignored.
 Check for running processes
     
Check for installed launchers and additional running processes on Windows and macOS.
Applies to: Installation, Uninstallation
Properties:
  • Include launchers
    If selected, the operation will check for running launchers in the current installation directory.
  • Additional executables
    The additional executables that should be checked. In the edit dialog you can choose files from the distribution tree or enter them manually. Additional executables that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate additional executables, this allows you to build a variable length list of additional executables at runtime. From relative files, only the file name is used for comparison. This enables checking for executables with an unknown location. To reference executables relative to your installation directory, please prefix them with ${installer:sys.installationDir}/. This is an optional property.
  • Close strategy
    The strategy used when processes are running.
  • Ignore button
    Add an ignore button to the dialog. The action will return successfully if the user clicks this button.
  • Time out for close
    The time out for the soft close strategy in milliseconds.
  • Message
    The message to be displayed at the top of the dialog.
 Modify an environment variable on Windows
     
Sets, appends to, or prepends to an environment variable on Windows. This action can be automatically reverted by the 'Uninstall files' action.
Applies to: Installation, Uninstallation
Properties:
  • Modification type
    Modification type
  • Variable name
    The name of the variable that should be modified.
  • Value
    The value to be set, appended or prepended.
  • User specific
    If the variable is user specific or system wide.
  • Revert on uninstallation [Uninstallation]
    Revert the change automatically on uninstallation if this action is used for an installer.
  • Only if not modified
    Revert the change only if the environment variable hss not been modified in the mean time. This is mainly useful for the 'set' modification type.

    Note: This property is only visible if "Revert on uninstallation" is selected.

 Modify classpath
     
Changes the classpath of a launcher by modifying or creating a .vmoptions file or by changing the Info.plist file. This action will be automatically reverted by the 'Uninstall files' action.
Applies to: Installation
Properties:
  • Launcher
    The launcher that the classpath should be changed for.
  • Classpath entries
    The classpath entries. In the edit dialog, you have to enter one item per line. Entries that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate entries, this allows you to build a variable length list of entries at runtime.
  • Modification type
    Modification type
  • Target file on macOS [macOS]
    For application bundles on macOS, there are two locations for .vmoptions files. One in the "Contents" directory inside the application bundle, and the other next to the application bundle. Both files are read by the launcher, but the contained file takes precedence. If the launcher is signed, you should choose the location next to the application bundle, otherwise the signature will be broken. If the target is a contained command line executable, this property is ignored.
 Request privileges
     
Requests configurable administrator privileges. On Windows Vista and higher and on macOS, the installer will be restarted with the requested privileges or a helper process will be created that can perform certain actions in a privileged context. When you restart the installer, you should not install files before this action.

Please see the help topic on "Elevation Of Privileges" for a detailed discussion of this action.

Applies to: Installation, Uninstallation
Properties:
  • Fall back to user specific installation directory [Error Handling]
    If administrator privileges cannot be obtained change the installation directory to a user-specific default value.
  • Show failure if current user is not root [Unix]
    If set and the current user is not root a failure message will be shown and the installation will be canceled. This property overrides the "Failure strategy" property of the action. A separate property is necessary since the behavior can be configured differently for Windows, macOS and Unix.
  • Try to obtain full privileges if admin user [Windows]
    If set and the user is an admin user with limited privileges on Vista and higher, the action will try to start a new process with full privileges.
  • Try to obtain full privileges if normal user [Windows]
    If set and the user is a non-admin user, the action will either try to start a new process with full privileges on Vista and higher or fail on previous versions of Windows.
  • Show failure if requested privileges cannot be obtained [Windows]
    If set and the privileges required above could not be obtained a failure message will be shown and the installation will be canceled. This property overrides the "Failure strategy" property of the action. A separate property is necessary since the behavior can be configured differently for Windows, macOS and Unix.
  • Try to obtain root privileges if admin user [macOS]
    If set and the user is an admin user, the action will try to start a new process with root privileges. The user will have to enter his password.
  • Try to obtain root privileges if normal user [macOS]
    If set and the user is a non-admin user, the action will try to start a new process with root privileges. The user will have to enter the password of an admin account.
  • Show failure if requested privileges cannot be obtained [macOS]
    If set and the privileges required above could not be obtained a failure message will be shown and the installation will be canceled. This property overrides the "Failure strategy" property of the action. A separate property is necessary since the behavior can be configured differently for Windows, macOS and Unix.
 Require installer privileges
     
Require the same privileges as the ones that were obtained during the installation. On Windows Vista and higher and on macOS, the uninstaller or custom installer application will be restarted with the requested privileges if necessary. This action only has an effect if a "Load response file" action is executed previously.

Please see the help topic on "Elevation Of Privileges" for a detailed discussion of this action.

Applies to: Installation, Uninstallation
Properties:
  • Show failure if required privileges cannot be obtained [General]
    If set and the privileges that were obtained in the installer could not be obtained by this action, a failure message will be shown and the installer application will be canceled.
 Run executable or batch file
     
Runs an executable or a Windows batch file. The action can optionally wait for termination of the executable.
Applies to: Installation, Uninstallation
Properties:
  • Executable
    The file that should be executed. Please do not add arguments here, there is a separate "Arguments" property.
  • Working directory
    The working directory for the execution.
  • Arguments
    The arguments passed to the executable. Please note that in the edit dialog, each argument starts on a new line. Arguments that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate arguments, this allows you to build a variable length list of arguments at runtime.
  • Use rollback executable
    If selected, an executable is invoked in the case of rollback. You can configure the executable with the child properties. All other properties, such as redirection and environment variables are shared with the regular executable.
  • Rollback executable
    The file that should be executed in the case of rollback. Please do not add arguments here, there is a separate "Arguments" property.

    Note: This property is only visible if "Use rollback executable" is selected.

  • Rollback working directory
    The working directory for the execution of the rollback executable.

    Note: This property is only visible if "Use rollback executable" is selected.

  • Rollback arguments
    The arguments passed to the rollback executable. Please note that in the edit dialog, each argument starts on a new line. Arguments that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate arguments, this allows you to build a variable length list of arguments at runtime.

    Note: This property is only visible if "Use rollback executable" is selected.

  • Wait for termination
    If the action should wait for termination of the process and check if the return value is 0.
  • Variable name for return code
    If set, the return code will be saved to this installer variable. The type of the variable will be java.lang.Integer. Under Windows, this variable will always be equal to 0 if the "Show console window" option below is selected.If a timeout has been set and the process is killed after the timeout, the return value will be -10000.

    Note: This property is only visible if "Wait for termination" is selected.

  • Timeout in seconds
    If set to a value greater than 0, the executable will be killed after that number of seconds if it does not return earlier.In that case, the return value will be -10000.

    Note: This property is only visible if "Wait for termination" is selected.

  • Wait for output streams
    If selected, the action will wait until the output streams of the process are fully written. If the process has launched child processes, this can mean that the action will wait until those child processes have terminated. If that is not desired, please deselect this option.

    Note: This property is only visible if "Wait for termination" is selected.

  • Log arguments
    If the arguments should be written into the log file or not. Disabled by default due to security reasons.
  • Include parent environment variables [Environment Variables]
    If selected, the environment variables of the parent process (the installer) will be set. Otherwise, only the environment variables in the "Specific environment variables" will be set. This option is ignored on macOS.
  • Specific environment variables [Environment Variables]
    Specify additional or modified environment variables that should be set for the executed process.

    Use previous values with the syntax ${PATH};additional.

  • Redirect stdout [Redirection]
    Redirection mode for stdout
  • Installer variable name
    An installer variable name to which the stdout output of the executed process is saved. The contents of the variable will not be displayed in the log file.

    Note: This property is only visible if "Redirect stdout" is set to "To installer variable".

  • Redirection file
    A file to which the stdout output of the executed process is saved. If you specify /dev/stdout, the output will be printed to the default stdout stream of the installer application. Relative paths are relative to the working directory of the installer application. In order to use a file in the installation directory, enter a path like ${installer:sys.installationDir}/log.txt.

    Note: This property is only visible if "Redirect stdout" is set to "To file".

  • Fail on error
    If selected, the action fails if the redirection file cannot be written. Otherwise, errors are silently ignored.

    Note: This property is only visible if "Redirect stdout" is set to "To file".

  • Redirect stderr [Redirection]
    Redirection mode for stderr
  • Installer variable name
    An installer variable name to which the stderr output of the executed process is saved. The contents of the variable will not be displayed in the log file.

    Note: This property is only visible if "Redirect stderr" is set to "To installer variable".

  • Redirection file
    A file to which the stderr output of the executed process is saved. If you specify /dev/stderr, the output will be printed to the default stderr stream of the installer application. Relative paths are relative to the working directory of the installer application. In order to use a file in the installation directory, enter a path like ${installer:sys.installationDir}/log.txt.

    Note: This property is only visible if "Redirect stderr" is set to "To file".

  • Fail on error
    If selected, the action fails if the redirection file cannot be written. Otherwise, errors are silently ignored.

    Note: This property is only visible if "Redirect stderr" is set to "To file".

  • Redirect stdin [Redirection]
    Redirection mode for stdin
  • Input string
    A string that should be fed to the input stream of the executed process.

    Note: This property is only visible if "Redirect stdin" is set to "From string".

  • Redirection file
    A file which should be fed to the input stream of the executed process. If you specify /dev/stdin, the input from the default stdin stream of the installer application will be used. Relative paths are relative to the working directory of the installer application. In order to use a file in the installation directory, enter a path like ${installer:sys.installationDir}/log.txt.

    Note: This property is only visible if "Redirect stdin" is set to "From file".

  • Fail on error
    If selected, the action fails if the redirection file cannot be written. Otherwise, errors are silently ignored.

    Note: This property is only visible if "Redirect stdin" is set to "From file".

  • Show console window [Windows]
    Show a console window with the console output of the executable. This makes only sense if a command line executable is called.
  • Keep console window
    If selected, the console window will not be closed when the executable has finished. The user has to close the console window manually. This can be useful for debugging purposes. If the "Wait for termination" property is selected, the action will not terminate until the user has closed the console window.

    Note: This property is only visible if "Show console window" is selected.

 Category: Persistence of installer variables
 
 Create a response file
     
Create a response file at an arbitrary location to save user input for subsequent installations. This file can be used with the -varfile command line option.
Applies to: Installation, Uninstallation
Properties:
  • File
    The response file that should be created. If it already exists, it will be overwritten.
  • Variable selection mode
    Determines which response file variables are written to the response file.
  • Excluded variables
    The variable that should be excluded from the response file. If empty all variables will be used. In the edit dialog, you have to enter one item per line. Entries that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate entries, this allows you to build a variable length list of entries at runtime.

    Note: This property is only visible if "Variable selection mode" is set to "All except specified response file variables".

  • Included variables
    The variable that should be included in the response file. If empty, no variables will be used. In the edit dialog, you have to enter one item per line. Entries that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate entries, this allows you to build a variable length list of entries at runtime.

    Note: This property is only visible if "Variable selection mode" is set to "Only specified response file variables".

 Load a response file
     
Load a response file that has previously been saved with the "Create a response file" action.
Applies to: Installation, Uninstallation
Properties:
  • File
    The response file that should be loaded. If empty, the action will try to load the automatically created response file named response.varfile that has been saved by a previous installer in the installation directory.
  • Excluded variables
    The variables in the response file that should be ignored. If empty, all variables will be loaded. In the edit dialog, you have to enter one item per line. Entries that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate entries, this allows you to build a variable length list of entries at runtime.
  • Overwrite strategy
    If "Overwrite existing" is selected, already defined installer variables will be overwritten by variable definitions in the response file. With "Do not overwrite command line", you can give priority to command line variable definitions of the form -Vname=value, but still overwrite previous variable definitions for other variables.
  • Register variables for response file
    If selected, all variables in the response file will be registered as response file variables, except forvariables that are excluded or system variables (starting with "sys."). Response file created by subsequent "Create a response file" actions and the automatically created response file by the installer will contain these variables.

    Note that form screens register bound variables for response files only when they are displayed, so if this option is deselected, the response file created by an update installation may not contain all variables from the original installation.

 Modify a response file
     
Update all variables in an existing response file. The action does not delete variables in the response file for which no installer variables are defined, but keeps them as they are.

This action is useful for updating a response file from a custom installer application, where not all installer variables are available.

Applies to: Installation, Uninstallation
Properties:
  • File
    The response file that should be created. If it already exists, it will be overwritten.
  • Variable selection mode
    Determines which response file variables are written to the response file.

    Note: This property is only visible if "Add response file variables" is selected.

  • Excluded variables
    The variable that should be excluded from the response file. If empty all variables will be used. In the edit dialog, you have to enter one item per line. Entries that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate entries, this allows you to build a variable length list of entries at runtime.

    Note: This property is only visible if "Variable selection mode" is set to "All except specified response file variables".

  • Included variables
    The variable that should be included in the response file. If empty, no variables will be used. In the edit dialog, you have to enter one item per line. Entries that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate entries, this allows you to build a variable length list of entries at runtime.

    Note: This property is only visible if "Variable selection mode" is set to "Only specified response file variables".

  • Add response file variables
    If selected, the specified response file variables are added to the response file. Otherwise only the existing definitions in the response file are updated with their current values.
 Category: Properties files
 
 Read a properties file
     
Read a properties file and save a java.util.Map object with the properties to an installer variable. If you use a "Write properties to file" action to write the variable back to disk, the comments on the existing property definitions will be preserved.
Applies to: Installation, Uninstallation
Properties:
  • Properties file
    The properties file that will be read.
  • Encoding
    Encoding for the properties file. If "java.util.Properties" is selected, the format of java.util.Properties will be emulated. For other encodings, the escaping for property values will be less aggressive.
  • Character set name
    The character set name as recognized by java.nio.Charset.forName(...). Values supported by all JREs include "US-ASCII" "ISO-8859-1" and "UTF-16".

    Specifying ISO-8859-1 is not the same as selecting "java.util.Properties" for the "Encoding" property, because - except for comments - that format only writes characters from the US-ASCII character set and escapes more basic characters in property values.

    Note: This property is only visible if "Encoding" is set to "Other".

  • Variable name
    The name of the variable that will be set with an instance of java.util.Map. Enter the variable without the installer prefix and the dollar sign.
  • Merge into existing variable
    If the variable already contains a value of type java.util.Map, the properties will be merged with the entries in that map. The actual map object after the action has run may be different, since install4j supplies a special map that can retain comments on property definitions.
 Remove keys from properties file
     
Remove selected keys from a properties file. The line separator of the properties file is conserved.
Applies to: Installation, Uninstallation
Properties:
  • Properties file
    The properties file that will modified.
  • Encoding
    Encoding for the properties file. If "java.util.Properties" is selected, the format of java.util.Properties will be emulated. For other encodings, the escaping for property values will be less aggressive.
  • Character set name
    The character set name as recognized by java.nio.Charset.forName(...). Values supported by all JREs include "US-ASCII" "ISO-8859-1" and "UTF-16".

    Specifying ISO-8859-1 is not the same as selecting "java.util.Properties" for the "Encoding" property, because - except for comments - that format only writes characters from the US-ASCII character set and escapes more basic characters in property values.

    Note: This property is only visible if "Encoding" is set to "Other".

  • Remove keys
    The names of the keys that should be removed. In the edit dialog, you have to enter one item per line. Keys that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate keys, this allows you to build a variable length list of keys at runtime.
 Write properties to file
     
Write property definitions to a properties file. The properties can come from an installer variable with a java.util.Map object, another properties file or from direct entry.

If the "Merge into existing file" property is selected, the new property definitions will be added to the existing ones.

Applies to: Installation, Uninstallation
Properties:
  • Properties file
    The properties file that will be written or modified.
  • Encoding
    Encoding for the properties file. If "java.util.Properties" is selected, the format of java.util.Properties will be emulated. For other encodings, the escaping for property values will be less aggressive.
  • Character set name
    The character set name as recognized by java.nio.Charset.forName(...). Values supported by all JREs include "US-ASCII" "ISO-8859-1" and "UTF-16".

    Specifying ISO-8859-1 is not the same as selecting "java.util.Properties" for the "Encoding" property, because - except for comments - that format only writes characters from the US-ASCII character set and escapes more basic characters in property values.

    Note: This property is only visible if "Encoding" is set to "Other".

  • Line separator
    The line separator that should be used for writing the properties file.
  • Merge into existing file
    If selected, and the properties file already exists, the file will be read first and the new property definitions will be added to the existing ones.
  • Update existing keys
    If selected, the values of existing keys will be updated with the new values.

    Note: This property is only visible if "Merge into existing file" is selected.

  • Update existing comments
    If selected, the comments of existing keys will be updated with the new comments. An existing comment will not be deleted if the new comment is empty.

    Note: This property is only visible if "Merge into existing file" is selected.

  • Source of property definitions
    The source of the new property definitions that should be written to the properties file.
  • Property definitions
    The new property definitions that should be written to the properties file. Comment lines starting with # and empty lines can be interspersed with the property definitions.

    Note: This property is only visible if "Source of property definitions" is set to "Direct entry".

  • Source properties file
    The source file with the new property definitions that should be written to the target properties file. The encoding must be the same as that of the target properties file.

    Note: This property is only visible if "Source of property definitions" is set to "Properties file".

  • Source variable name
    The variable name with a java.util.Map object containing the new property definitions that should be written to the properties file. If the map was read by a "Read a properties file" action, the original comments will be used.

    Note: This property is only visible if "Source of property definitions" is set to "Installer variable".

  • Replace installer variables
    If selected, installer variables written in the syntax ${installer:variableName} will be replaced with their current values for all property values. If an installer variable does not exist, an error message will be inserted.
  • Sort properties
    This property determines where new properties should be inserted with respect to existing properties. If the keys are sorted, then existing and new properties are sorted together.
 Category: Services
 
 Install a service
     
Installs a service. On Windows, this is done by executing the service launcher with the appropriate arguments. On Unix, a link will be placed in /etc/init.d. On macOS, a LaunchDaemon will be created. This action will be automatically reverted by the 'Uninstall files' action.

If a helper process with elevated privileges has been created by the "Request privileges" action, this action is pushed to the helper process. Please see the help topic on "Elevation Of Privileges" for more information.

Applies to: Installation
Properties:
  • Service [General]
    The service launcher that will be installed.
  • Executable
    The service executable.
  • Name
    The name of the service.
  • Auto Start [General]
    If the service should be started automatically at boot time.
  • Description [General]
    An optional description for the service.
  • Account Name or SID
    The account name or a SID in String form.

    Note: This property is only visible if "Account" is set to "Other".

  • Password
    The password for the specified account.

    Note: This property is only visible if "Account" is set to "Other".

  • Windows Arguments [Windows]
    Optional arguments passed to the main function of the service executable.
  • Windows Dependencies [Windows]
    Optional dependencies for Windows. Specify as a comma-separated list of the names of the services that must be started before this service. You do not have to enter core OS services these services will always be initialized before your service is launched.
  • Windows Custom Display Name [Windows]
    Optional display name for the service. If empty, the service name is used.
  • Windows Priority [Windows]
    The base priority class for the service. This only applies to services generated by install4j.
  • Account [Windows]
    The account the service should run under. Use Local System if you are not sure what you need.
  • Keep Current Account [Windows]
    If the service was already installed, use the currently specified account instead of the values above.
  • Restart on Failure [Windows]
    If the service should be automatically restarted if it doesn't exit with exit code 0 or if it crashes.
  • Interactive [Windows]
    If the service can interact with the desktop. Not recommended for Windows Vista and higher.
  • Delayed Auto Start [Windows]
    If checked and "Auto Start" is also selected the service will be started after all other auto start services with an additional short delay.
  • macOS Identifier [macOS]
    The launch daemon identifier for macOS. Typically, this is something like com.mycorp.myService.
 Start a service
     
Starts a service by executing the service launcher with the appropriate arguments.

If a helper process with elevated privileges has been created by the "Request privileges" action, this action is pushed to the helper process. Please see the help topic on "Elevation Of Privileges" for more information.

Applies to: Installation
Properties:
  • Service [General]
    The service launcher that will be started.
  • Executable
    The service executable.
  • Name
    The name of the service.
  • For "Auto start installations" only [General]
    If selected, the service will only be started when it is installed as an "Auto start" service on Windows and macOS. This is a property on the "Install a service" action.
 Stop a service
     
Stops a service by executing the service launcher with the appropriate arguments.

If a helper process with elevated privileges has been created by the "Request privileges" action, this action is pushed to the helper process. Please see the help topic on "Elevation Of Privileges" for more information.

Applies to: Installation, Uninstallation
Properties:
  • Service [General]
    The service launcher that will be stopped.
  • Executable
    The service executable.
  • Name
    The name of the service.
 Category: Text files
 
 Fix line feeds
     
Changes the line feeds of text files to the platform specific type.
Applies to: Installation, Uninstallation
Properties:
  • Text files
    The text files that should be fixed. In the edit dialog you can choose files from the distribution tree or enter them manually. Text files that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate text files, this allows you to build a variable length list of text files at runtime. You can add directories as well. In this case, all files in the selected directories that satisfy the "Suffixes" property will be fixed.
  • Suffixes
    The suffixes with a leading dot of the files to be fixed if the "File" property is a directory. If empty, all files will be used. In the edit dialog, you have to enter one item per line. Suffixes that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate suffixes, this allows you to build a variable length list of suffixes at runtime.
  • Recursive
    If selected, the operation will be performed recursively on directories. If no selected, all files in directories will be fixed, but subdirectories will not be touched.
 Modify text files
     
Modify installed text files by replacing a search value in the selected files. This action does not read the entire file into memory and can work on arbitrarily large text files.
Applies to: Installation, Uninstallation
Properties:
  • Text files
    The text files that should be modified. In the edit dialog you can choose files from the distribution tree or enter them manually. Text files that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate text files, this allows you to build a variable length list of text files at runtime.
  • Search value
    The value that should be searched
  • Replace value
    The value that should be used instead
  • Log replacement
    If the replacement text should be written into the log file or not. If the modified file has different security settings than the log file, you might want to disable this property for security reasons.
  • Fail if no replacement occurred
    If selected, the action will fail if no replacement was performed by the action. Note that you have to set the error message property in order to display the error to the user.
  • Escape for property file
    If set, the replaced values will be escaped for use in a Java property file.
  • Encoding
    The encoding of the file. If you leave this empty the system default will be used. Common encodings are UTF-8, UTF-16, ISO-8859-1.
 Modify text files with regular expressions
     
Modify installed text files by applying a regular expression.
Applies to: Installation, Uninstallation
Properties:
  • Text files
    The text files that should be modified. In the edit dialog you can choose files from the distribution tree or enter them manually. Text files that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate text files, this allows you to build a variable length list of text files at runtime.
  • Match expression
    The match expression, which is applied to the entire contents of the file. If you wish to use the characters ^ and $ for matching line start and line end, please prefix the expression with (?m). This switches on multi-line mode. For case-insensitive expressions, prefix with (?i).
  • Replacement
    The replacement.
  • Replace all
    If all occurrences should be replaced or only the first one.
  • Quote variables
    If values of installer variables in the match and replacement expressions should be quoted. This means that the characters of replaced installer variables will be treated literally instead of modifying the search or replace expressions with special characters such as \ or $.
  • Log replacement
    If the replacement text should be written into the log file or not. If the modified file has different security settings than the log file, you might want to disable this property for security reasons.
  • Fail if no replacement occurred
    If selected, the action will fail if no replacement was performed by the action. Note that you have to set the error message property in order to display the error to the user.
  • Escape for property file
    If set, the replaced values will be escaped for use in a Java property file.
  • Encoding
    The encoding of the file. If you leave this empty the system default will be used. Common encodings are UTF-8, UTF-16, ISO-8859-1.
 Read text from file
     
Read the content of a text file and save it to an installer variable. The variable value will be of type String.
Applies to: Installation, Uninstallation
Properties:
  • File
    The file from which the text should be read. If the file does not exist, the variable value will not be set.
  • File encoding
    The encoding of the text file. If empty, the native encoding of the operating system will be used.
  • Variable name
    The name of the variable whose value will be set to the text content of the file. If the file cannot be found, the variable value will not be set.
 Replace installer variables in text files
     
Modify installed text files by replacing all occurrences of installer variables of the form ${installer:myVariable} with their current values. The action also replaces i18n variables like ${i18n;myKey} and compiler variables like ${compiler:myCompilerVariable}
Applies to: Installation, Uninstallation
Properties:
  • Text files
    The text files that should be modified. In the edit dialog you can choose files from the distribution tree or enter them manually. Text files that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate text files, this allows you to build a variable length list of text files at runtime.
  • Ignore missing variables
    If selected, all missing occurrences of variables will be left as they are. If unselected, a missing variable will be a fatal error leading to the termination of the installer.
  • Fail if no replacement occurred
    If selected, the action will fail if no replacement was performed by the action. Note that you have to set the error message property in order to display the error to the user.
  • Escape for property file
    If set, the replaced values will be escaped for use in a Java property file.
  • Encoding
    The encoding of the file. If you leave this empty the system default will be used. Common encodings are UTF-8, UTF-16, ISO-8859-1.
 Write text to a file
     
Write text to a new file or append text to an existing file.
Applies to: Installation, Uninstallation
Properties:
  • File
    The file that the text should be appended to. If it doesn't exist it will be created.
  • Text
    The text that should be appended.
  • Encoding
    The encoding of the file. If you leave this empty the system default will be used.
  • Escaped text
    If selected, escape sequences like \n,\t or \u1234 in the text property will be replaced.
  • Append
    If selected, and the file exists, the text will be appended to the existing file. If the file does not exist, it will be created in any case.
  • Log text
    If the text should be written into the log file or not. If the written file has different security settings than the log file, you might want to disable this property for security reasons.
 Category: Update
 
 Check for update
     
Load the update descriptor from the a URL and save it to the a variable. If successful, the variable will contain an instance of com.install4j.api.UpdateDescriptor
Applies to: Installation, Uninstallation
Properties:
  • Update descriptor URL
    The URL from which the update descriptor for this project can be downloaded. The update descriptor file is automatically created when compiling the project and can be found in the media output directory. The URL must start with http:// or https://. If you add a query string, it must already be URL encoded.

    For testing purposes, you can also use a file URL like file:/c:/test/updates.xml.

  • Request headers
    A list of name-value pairs that should be set as additional headers for the request.

    Request headers that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate request headers, this allows you to build a variable length list of request headers at runtime.

  • Variable
    The installer variable to which an instance of class com.install4j.api.UpdateDescriptor will be saved if the action is successful.
  • Ask for proxy if necessary [Error Handling]
    At first, the connection is attempted with the proxy information that is set for the default browser. If that fails, and this property is selected, a proxy dialog will be shown where the user can configure the proxy that should be used to connect to the web server.
  • Network failure script [Error Handling]
    A script that is executed if the HTTP connection fails in such a way, that the proxy dialog would have to be shown. If you return ErrorHandlingMode.IGNORE, the regular proxy or failure handling will proceed, if you return ErrorHandlingMode.CANCEL, the action will fail immediately. If you can take corrective action in the script, you can return ErrorHandlingMode.RETRY to make the same HTTP request again. However, you have to take special care not to enter an infinite loop. Typically, there should be user input before you retry and the user should be given the option to cancel.

    The script is only executed for actual network failures, and not if the server or the proxy connection require authentication.

  • Accept all SSL certificates [Error Handling]
    If the protocol of the URL starts with "https" and this property is selected, the SSL certificate will not be checked for validity. This is only recommended for testing purposes when working with self-signed certificates.
  • Connect timeout [Error Handling]
    The timeout for establishing the socket connection in milliseconds. A timeout of zero is interpreted as an infinite timeout.
  • Read timeout [Error Handling]
    The timeout for reading data from the socket connection in milliseconds. A timeout of zero is interpreted as an infinite timeout.
  • Show error message [Error Handling]
    Show a default error message if the download fails.
 Schedule update installation
     
Schedule a downloaded media file to be started upon the next start of a launcher configured accordingly or by calling UpdateChecker.executeScheduledUpdate().
Applies to: Installation
Properties:
  • Installer file
    The downloaded installer or macOS single bundle archive.
  • Version
    The version of the new installer.
  • Installer arguments
    Optional additional arguments that should be passed to the installer.
  • Maximum retries on error [Installation Error Handling]
    The maximum number of the times the installer will be executed if an error occurs during installation. Retry is inhibited for one day after an error.
  • Maximum retries on cancel [Installation Error Handling]
    The maximum number of the times the installer will be executed if it was cancelled by the user. Retry is inhibited for one day after cancellation.
 Shut down calling launcher
     
Shut down the launcher that called this application if it was started with the com.install4j.api.launcher.ApplicationLauncher API.
Applies to: Installation, Uninstallation
Properties:
  • Wait
    If selected the action will wait for the calling launcher to exit.
  • Timeout
    The timeout in seconds this action will wait if the 'Wait' property is true. If set to 0 there will be no timeout.
 Category: Windows registry
 
 Add access rights for a key in the Windows registry
     
Add access rights for a key in the Windows registry.

If a helper process with elevated privileges has been created by the "Request privileges" action, this action is pushed to the helper process. Please see the help topic on "Elevation Of Privileges" for more information.

Applies to: Installation, Uninstallation
Properties:
  • Registry root
    The Windows registry root where the key is located.
  • Key name
    The name of the registry key without a leading backslash.
  • Trustee [Rights]
    The trustee for which the access right should be granted.
  • SID or Account Name
    The SID in String form or the account name for which the access right should be granted.

    Note: This property is only visible if "Trustee" is set to "SID or Account Name".

  • Read [Rights]
    The right to read the object.
  • Write [Rights]
    The right to write to the object.
  • Execute [Rights]
    The right to execute the object.
  • All [Rights]
    All available rights.
 Delete a key or value in the Windows registry
     
Delete a key or value in the Windows registry.
Applies to: Installation, Uninstallation
Properties:
  • Registry root
    The Windows registry root where the key or value should be deleted.
  • Key name
    The name of the registry key that should be deleted or contains the value to be deleted without a leading backslash.
  • Value name
    The name of the registry value that should be deleted. If you leave this empty, the key will be deleted instead.
  • Only if empty
    If a key should only be deleted when it contains no sub-keys or values.
 Read a value from the Windows registry
     
Read a value from the Windows registry and save it to an installer variable. The type of the value depends on the type in the registry, it will be an instance of one of the following classes: String, Integer, String[], byte[], WinRegistry.ExpandString.
Applies to: Installation, Uninstallation
Properties:
  • Registry root
    The Windows registry root where the key is located.
  • Key name
    The name of the registry key where the value is located without a leading backslash.
  • Value name
    The name of the registry value whose string content should be read.
  • Use a default value
    If selected, a default value will be saved to the variable if the key cannot be found in the registry. Otherwise a missing registry value will result in the failure of the action and the variable will not be set.
  • Default value
    The default value that will be used if the value cannot be found in the registry.

    Note: This property is only visible if "Use a default value" is selected.

  • Variable name
    The name of the variable that will be set with the value. Enter the variable without the installer prefix and the dollar sign. If the value cannot be found in the registry, the variable value will not be set.
 Set a value in the Windows registry
     
Set a value in the Windows registry. This action can also create the appropriate key if necessary.
Applies to: Installation, Uninstallation
Properties:
  • Registry root
    The Windows registry root where the key should be created
  • Key name
    The name of the registry key that contains the value or that should be created without a leading backslash.
  • Value name
    The name of the registry value.
  • Value
    The value that should be written into the registry.
  • Create key
    If set the key will be created if it doesn't exist.
 Category: XML files
 
 Apply an XSLT transform
     
Transform an installed file by applying an XSLT stylesheet.
Applies to: Installation, Uninstallation
Properties:
  • Source file
    The source for the transformation. This can be the same file as the destination.
  • Destination file
    The output of the transformation. This can be the same file as the source.
  • Stylesheet
    The XSLT stylesheet to apply.
  • Download external entities [XML parser]
    If selected, a DTD referenced with an HTTP system ID will be downloaded as the document is parsed. The success of the action requires a direct internet connection in that case.
  • Validate XML file [XML parser]
    If selected, the XML parser will validate the document according to a associated DTD or XML schema. If the validation is unsuccessful, the action will fail.
 Count nodes in XML file
     
Count the occurrences of an XPath expression in an XML file and save the result to an installer variable.
Applies to: Installation, Uninstallation
Properties:
  • XML file
    The XML file that should be read. It will not be validated, and no external entities will be downloaded.
  • XPath expression
    The XPath expression whose occurrences should be counted. Example for counting attributes: /myRootNode/myChildNode/@myAttribute. Example for counting regular nodes: /myRootNode/myChildNode
  • Variable name
    The name of the variable that will be set to the result of the count as a java.lang.Integer. Enter the variable without the installer prefix and the dollar sign?. If the XPath expression cannot be found, the variable value will be zero.
 Insert XML fragment into XML files
     
Insert an XML fragment into the position defined by an XPath expression. The fragment can replace an existing element node, or it can be inserted as a child or a sibling.
Applies to: Installation, Uninstallation
Properties:
  • XML files
    The XML files that should be modified. In the edit dialog you can choose files from the distribution tree or enter them manually. XML files that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate XML files, this allows you to build a variable length list of XML files at runtime.
  • XPath expression
    The XPath expression to the DOM nodes for which the insertion or replacement should be performed. The result of the XPath expression should consist of one or more element nodes and not of attribute or text nodes.

    Example for selecting nodes by position: /levelOne[2]/levelTwo[4].
    Example for selecting nodes by attribute: /myRootNode/myChildNode[id='123'].

    If no match can be found, the action will fail.

  • XML fragment source
    The XML fragment that is inserted can either be entered directly in a text editor or be read from a file.
  • XML fragment text
    The XML fragment that should be inserted. The fragment must not include an XML declaration and can contain multiple top-level elements.

    Example: <insert>1</insert><insert>2</insert>

    Note: This property is only visible if "XML fragment source" is set to "Direct entry".

  • XML fragment file
    The source file with the XML fragment that should be inserted. The file has to contain a well-formed XML file. The root element is discarded and the XML fragment is formed from its immediate children.

    Note: This property is only visible if "XML fragment source" is set to "Fragment file".

  • Insert mode
    For each result of the XPath expression, the selected action is performed. You can replace the matched element, insert the fragment as a sibling or as a child.

    To insert as the n-th child, enter a positional XPath expression like /root/nested[3], and choose "Insert before".

  • Download external entities [XML parser]
    If selected, a DTD referenced with an HTTP system ID will be downloaded as the document is parsed. The success of the action requires a direct internet connection in that case.
  • Validate XML file [XML parser]
    If selected, the XML parser will validate the document according to a associated DTD or XML schema. If the validation is unsuccessful, the action will fail.
 Read value from XML file
     
Read a string value from an XML file specified by an XPath expression and save the result to an installer variable.
Applies to: Installation, Uninstallation
Properties:
  • XML file
    The XML file that should be read. It will not be validated, and no external entities will be downloaded.
  • XPath expression
    The XPath expression to the DOM node whose string value should be read. Example for reading text from an attribute: /myRootNode/myChildNode/@myAttribute. Example for reading text from an element: /myRootNode/myChildNode/text()
  • Variable name for string value
    The name of the variable that will be set with the string value of the matched node. Enter the variable without the installer prefix and the dollar sign. If the XPath expression cannot be found, the variable value will not be set. If the XPath expression matches a node with a null node value, such as en element, the variable will be set to null.
  • Variable name for node
    The name of the variable that will be set with the node as an org.w3c.dom.Node instance. Enter the variable without the installer prefix and the dollar sign. If the XPath expression cannot be found, the variable value will not be set.
 Remove nodes from XML files
     
Remove selected nodes from XML files by specifying an XPath expression.
Applies to: Installation, Uninstallation
Properties:
  • XML files
    The XML files that should be modified. In the edit dialog you can choose files from the distribution tree or enter them manually. XML files that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate XML files, this allows you to build a variable length list of XML files at runtime.
  • XPath expression
    The XPath expression to the DOM nodes that should be removed. The result of the XPath expression can be or any node type.

    Example for selecting element nodes: /myRootNode/myChildNode[id='123'].
    Example for selecting attribute nodes: //@removedAttribute.
    Example for selecting text nodes: //container/text().

    If no match can be found, the action will fail.

  • Download external entities [XML parser]
    If selected, a DTD referenced with an HTTP system ID will be downloaded as the document is parsed. The success of the action requires a direct internet connection in that case.
  • Validate XML file [XML parser]
    If selected, the XML parser will validate the document according to a associated DTD or XML schema. If the validation is unsuccessful, the action will fail.
 Replace text in XML files
     
Modify installed XML files by selecting nodes with an XPath expression and applying a regular expression on the selected values.
Applies to: Installation, Uninstallation
Properties:
  • XML files
    The XML files that should be modified. In the edit dialog you can choose files from the distribution tree or enter them manually. XML files that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate XML files, this allows you to build a variable length list of XML files at runtime.
  • XPath expression
    The XPath expression to selected DOM nodes that have a value (this includes attributes and text).

    Example for replacing text in an attribute: /myRootNode/myChildNode/@myAttribute.
    Example for replacing text in an element: /myRootNode/myChildNode/text(). This will also work if myChildNode is an empty node.

    If you want to match line breaks with the dot as well, prefix the regular expression with (?s). If you want the comparison to be case insensitive, prefix it with (?i).

  • Match expression
    The match expression. This is a regular expression.
  • Replacement
    The replacement. The replacement string may contain references to subsequences, see the javadoc for java.util.regex.Matcher#appendReplacement for more details
  • Replace all
    If all occurrences should be replaced or only the first one.
  • Quote variables
    If values of installer variables in the match and replacement expressions should be quoted. This means that the characters of replaced installer variables will be treated literally instead of modifying the search or replace expressions with special characters such as \ or $.
  • Log replacement
    If the replacement text should be written into the log file or not. If the modified file has different security settings than the log file, you might want to disable this property for security reasons.
  • Download external entities [XML parser]
    If selected, a DTD referenced with an HTTP system ID will be downloaded as the document is parsed. The success of the action requires a direct internet connection in that case.
  • Validate XML file [XML parser]
    If selected, the XML parser will validate the document according to a associated DTD or XML schema. If the validation is unsuccessful, the action will fail.
 Category: ZIP files and archives
 
 Create a ZIP file
     
Create a ZIP file from the specified source files and directories.
Applies to: Installation, Uninstallation
Properties:
  • ZIP file
    The ZIP file that should be created.
  • Source files or directories
    The files and directories to be zipped. In the edit dialog you can choose files from the distribution tree or enter them manually. Files and directories that are installer variables with array values (e.g. String[], Object[] or File[]) are expanded as separate files and directories, this allows you to build a variable length list of files and directories at runtime.
  • File filter script
    The file filter script is invoked for each file that is about to be processed by this action. The script is not invoked for directories. You can return true if the file should be processed or false if it should be excluded from processing.
  • Directory filter script
    The directory filter script is invoked for each directory that is about to be processed by this action. The script is not invoked for files. You can return true if the directory should be processed or false if it should be excluded from processing.
  • Show progress
    If selected, and a progress bar is available on the current screen, the action will show its progress in the progress bar.
  • Show file names
    If selected, the names of the files that are processed will be shown during the installation.

    Note: This property is only visible if "Show progress" is selected.

  • Resolve relative file in
    A relative zip file can be resolved against the installation directory or against the root of the temporarily extracted archive.
  • Add top level directories
    If selected, all directories that you have added to the source files, will be added under the name of the directory. Otherwise, the contents of the directories will be added directly to the root of ZIP file.
  • ZIP method
    The compression method used to add files. To compress files, select "Deflated", to store files without compression, select "Stored".
 Extract a DMG file on macOS
     
Extracts the content of a DMG file to an arbitrary location on macOS.
Applies to: Installation, Uninstallation
Properties:
  • DMG file
    The DMG file that contains the content to be extracted.
  • File filter script
    The file filter script is invoked for each entry in the archive file that is about to be processed by this action. The script is invoked for both directories and files, which are passed as relative files. You can return true if the file or directory should be processed or false if it should be excluded from processing. If you leave the script empty, all files and directories are processed.
  • Destination directory
    The destination directory. Relative directory information in the zip file will be added to this value. If the destination directory does not exist, it will be created.
  • Show progress
    If the action should show its progress with the progress bar and the detail message.
  • Show file names
    If selected, the names of the files that are processed will be shown during the installation.

    Note: This property is only visible if "Show progress" is selected.

 Extract a TAR file
     
Extracts the content of a tar or tar.gz file to an arbitrary location.
Applies to: Installation, Uninstallation
Properties:
  • Tar file
    The tar or tar.gz file that contains the content to be extracted.
  • File filter script
    The file filter script is invoked for each entry in the archive file that is about to be processed by this action. The script is invoked for both directories and files, which are passed as relative files. You can return true if the file or directory should be processed or false if it should be excluded from processing. If you leave the script empty, all files and directories are processed.

    Note that tar files have no hierarchical directory structure, so it is not guaranteed that you are passed directory entries before entries of contained files. This also means that by excluding a directory, you do not automatically exclude its contents, you have to check and reject each contained file as well.

  • Destination directory
    The destination directory. Relative directory information in the zip file will be added to this value. If the destination directory does not exist, it will be created.
  • Show progress
    If the action should show its progress with the progress bar and the detail message.
  • Show file names
    If selected, the names of the files that are processed will be shown during the installation.

    Note: This property is only visible if "Show progress" is selected.

 Extract a ZIP file
     
Extracts the content of a ZIP file to an arbitrary location.
Applies to: Installation, Uninstallation
Properties:
  • Zip file
    The zip file that contains the content to be installed.
  • File filter script
    The file filter script is invoked for each entry in the ZIP file that is about to be processed by this action. The script is invoked for both directories and files, which are passed as relative files. You can return true if the file or directory should be processed or false if it should be excluded from processing. If you leave the script empty, all files and directories are processed.

    Note that ZIP files have no hierarchical directory structure, so it is not guaranteed that you are passed directory entries before entries of contained files. This also means that by excluding a directory, you do not automatically exclude its contents, you have to check and reject each contained file as well.

  • Destination directory
    The destination directory. Relative directory information in the zip file will be added to this value. If the destination directory does not exist, it will be created.
  • Show progress
    If the action should show its progress with the progress bar and the detail message.
  • Show file names
    If selected, the names of the files that are processed will be shown during the installation.

    Note: This property is only visible if "Show progress" is selected.

  • File name encoding
    The encoding for names of ZIP file entries. If you leave this property empty, UTF-8 will be used. Only has an effect on Java 7+.
  • Resolve relative file in
    A relative destination directory can be resolved against the installation directory or against the root of the temporarily extracted archive.
  • Resolve relative file in
    A relative zip file can be resolved against the installation directory or against the root of the temporarily extracted archive.
  • File access mode [Unix]
    The UNIX access mode of extracted files.
  • Dir access mode [Unix]
    The UNIX access mode of extracted directories.
 Install content of a ZIP file
     
Installs the content of an external ZIP file to an arbitrary location. This action will be automatically reverted by the 'Uninstall files' action.
Applies to: Installation
Properties:
  • Zip file
    The zip file that contains the content to be installed.
  • File filter script
    The file filter script is invoked for each entry in the ZIP file that is about to be processed by this action. The script is invoked for both directories and files, which are passed as relative files. You can return true if the file or directory should be processed or false if it should be excluded from processing. If you leave the script empty, all files and directories are processed.

    Note that ZIP files have no hierarchical directory structure, so it is not guaranteed that you are passed directory entries before entries of contained files. This also means that by excluding a directory, you do not automatically exclude its contents, you have to check and reject each contained file as well.

  • Destination directory
    The destination directory. Relative directory information in the zip file will be added to this value. If the destination directory does not exist, it will be created.
  • Show progress
    If the action should show its progress with the progress bar and the detail message.
  • Show file names
    If selected, the names of the files that are processed will be shown during the installation.

    Note: This property is only visible if "Show progress" is selected.

  • File name encoding
    The encoding for names of ZIP file entries. If you leave this property empty, UTF-8 will be used. Only has an effect on Java 7+.
  • Overwrite mode
    How to handle an existing destination file.
  • Uninstall mode
    The mode how the uninstaller should handle files created with this action.
  • File access mode [Unix]
    The UNIX access mode of installed files.
  • Dir access mode [Unix]
    The UNIX access mode of installed directories.
  • Shared file [Windows]
    If the file should be registered as a shared file.
  • Delay if necessary [Windows]
    If selected and a destination file cannot be replaced, the operation will be scheduled for the next reboot. The variable sys.rebootRequired will be set to Boolean.TRUE in this case.
  • Trigger reboot if required [Windows]
    If selected and an operation is delayed until reboot, the user will be asked for a reboot automatically at the end of installation.
 Modify a ZIP file
     
Modify the contents of a ZIP file with a configurable list of actions.
Applies to: Installation, Uninstallation
Properties:
  • Zip file
    The zip file that should be modified.
  • Modification actions
    The actions that modify the contents of the ZIP file. All actions operate in the root directory of the temporarily extracted ZIP file, except where configurable otherwise.

    The "Copy files and directories" action can be used to copy files into or from the archive, the "Delete files and directories" action is used for removing files. All actions for modifying text files, XML files, property files and ZIP files are also supported.

  • ZIP method for new files
    The compression method for new files. To compress files, select "Deflated", to store files without compression, select "Stored".
  • Show progress
    If the action should show its progress with the progress bar and the detail message.
 Download and install component
     
Download a specified downloadable component and install it. This action only works for installation components that have been marked as "downloadable" on the "Options" tab of the installation component configuration.

Note: The "Install Files" action already downloads and installs all selected downloadable installation components.This action is intended for scenarios where an installation component has to be downloaded after the "Install files" action has run. For example, you could use this in a custom installer application to install optional files.

Applies to: Installation
Properties:
  • Installation component
    The installation component to be downloaded. Only downloadable installation components are displayed
  • Show progress
    If selected, and a progress bar is available on the current screen, the action will show its progress in the progress bar.
  • Show file names
    If selected, the names of the files that are installed will be shown during the installation.
  • Accept all SSL certificates [Error Handling]
    If the protocol of the URL starts with "https" and this property is selected, the SSL certificate will not be checked for validity. This is only recommended for testing purposes when working with self-signed certificates.
  • File filter [Handlers]
    Expression or script that is invoked for each file to decide whether to install the file or not.
  • Directory resolver [Handlers]
    Expression or script that resolves the actual installation directory separately for each installed file. Return null, if you would like to choose the standard installation directory for a file.
  • Delay if necessary [Windows]
    If selected and a destination file cannot be replaced, the operation will be scheduled for the next reboot. The context method isRebootRequired() will return true in this case.
  • Trigger reboot if required [Windows]
    If selected and an operation is delayed until reboot, the user will be asked for a reboot automatically at the end of installation.
  • Install in single bundle [macOS]
    This option only applies to single bundle media types. If selected, files will be resolved inside the bundle. In this case, the behavior is equivalent to the "Install files" action. If unselected files will be resolved like specified in the distribution tree. A "Directory resolver" script can be used to specify a useful installation location.
 Execute previous uninstaller
     
Uninstalls the previous installation of this application in the selected installation directory by executing the previous uninstaller.
Applies to: Installation
Properties:
  • Installation directory
    The installation directory for which the uninstaller should be run. Leave empty for the current installation directory.
  • Only if the same application ID is found
    If selected, the action will only be performed if the application ID found in the installation directory is the same as that of the currently executed installer.
  • Uninstall services
    If selected, the uninstaller will auto-uninstall services. Deselect this option if you want to retain previous service settings like the user account setting on Windows. Works only with uninstallers built with install4j 6.1+.
  • Installer variables
    Specify installer variables that should be passed to the uninstaller.

    Use the button on the right side to open a dialog for easy entry or enter a list of definitions separated by semicolons like var1=value1;var2=value2. Use installer variables from the installer with the usual syntax var1=${installer:otherVar}.

 Install files
     
Install all files in the distribution tree that are contained in the selected installation components.
Applies to: Installation
Properties:
  • Validate application id
    Check if another application is installed in the selected directory or if the application is not the correct target for an add-on installer. If you have an "installation location" screen, you don't have to select this option.
  • Insufficient disk space warning
    Show a warning message if there is not sufficient disk space for the installation on the selected target drive.
  • Install runtime
    Create the installation directory and install the install4j runtime. If your installer just modifies some folders and does not need launchers, an uninstaller or custom installer applications, you can deselect this option and use other installation roots in the distribution tree to install files.
  • Update bundled JRE
    Update a bundled JRE if it already exists. If your application uses the JRE outside the generated launchers, an update of a bundled JRE might fail. In that case you can deselect this property to keep the old JRE and skip the update.
  • Save downloaded files
    If this property is set and the action downloads files it will try to place them next to the media file. In this case, the installer won't have to download the files again if it is invoked another time.
  • Show file names
    If selected, the names of the files that are installed will be shown during the installation.
  • Accept all SSL certificates [Error Handling]
    If the protocol of the URL starts with "https" and this property is selected, the SSL certificate will not be checked for validity. This is only recommended for testing purposes when working with self-signed certificates.
  • File filter [Handlers]
    Expression or script that is invoked for each file to decide whether to install the file or not.
  • Directory resolver [Handlers]
    Expression or script that resolves the actual installation directory separately for each installed file. Return null, if you would like to choose the standard installation directory for a file.
  • Installation size calculator [Handlers]
    Expression or script that calculates a custom installation size in bytes. The default size in bytes is passed as a parameter.
  • Delay if necessary [Windows]
    If selected and a destination file cannot be replaced, the operation will be scheduled for the next reboot. The context method isRebootRequired() will return true in this case.
  • Trigger reboot if required [Windows]
    If selected and an operation is delayed until reboot, the user will be asked for a reboot automatically at the end of installation.
 Uninstall files
     
Uninstall all installed files.
Applies to: Uninstallation