You can run an installer either by invoking it from the command line or double-clicking it from your desktop environment. On Linux and other Unix environments, the only requirement is that the file must have executable permissions, which it has by default when it is created. Sometimes those permissions can be lost, such as when downloading an installer from a website. In that case you can restore the executable permissions with:
chmod u+x installbuilder-professional-21.3.0-linux-installer.run
Because the generated OS X installers are regular .app applications, they contain a directory structure and you will need to add them to a zip file or disk image for distribution over the web. On OS X, when a user downloads a zip file containing an application, it will automatically be unpacked and the user will be prompted to launch it.
On Windows, the installer runs graphically with a native look and feel or it can be invoked in unattended mode (see below). On Mac OS X, the installer runs with the native Aqua look and feel and can also be run in text and unattended modes. On Linux and other supported Unix systems, there are multiple installation modes:
--mode xwindow command line switch.
--mode text command line option to the installer.
--mode unattended command line option. This is useful for automating installations or for inclusion in shell scripts, as part of larger installation processes.
You can require administrator privileges in your installer by using the <requireInstallationByRootUser> tag:
<project>
...
<requireInstallationByRootUser>1</requireInstallationByRootUser>
...
</project>This will require the end user to have root privileges on Unix platforms (possibly using sudo to invoke the installer) or Administrator privileges on Windows. If the user does not have the appropriate privileges, an error will be displayed and the installer will exit. In the case of OS X, the user will be prompted with an Admin password dialog to raise its privileges.
Once running, you can check whether the installer is running as administrator by checking the ${installer_is_root_install} built-in variable:
<showText text="You are not administrator!">
<ruleList>
<isFalse value="${installer_is_root_install}"/>
</ruleList>
</showText>When running on the latest Windows versions (Vista and newer), if the UAC is enabled, the installer will be forced to be executed as Administrator by default, regardless of the value of the <requireInstallationByRootUser> tag. This behavior is forced by the OS but can be also configured in the project using the <requestedExecutionLevel> tag:
<project> ... <requestedExecutionLevel>requireAdministrator</requestedExecutionLevel> ... </project>
The allowed values for this setting are:
Under these circumstances, if want you installer to do not require administrator privileges, you should configure the settings below in your project:
<project>
...
<requireInstallationByRootUser>0</requireInstallationByRootUser>
<requestedExecutionLevel>asInvoker</requestedExecutionLevel>
...
</project>Sometimes users accidentally launch multiple instances of the installer. In most cases this is not an issue, but if this is an issue for you, you can
prevent users from launching the installer multiple times by enabling the <singleInstanceCheck> project property:
<project>
...
<singleInstanceCheck>1</singleInstanceCheck>
...
</project>If the installer is launched a second time while it is still running, it will display a pop-up dialog asking whether or not to continue with the installation.
If you want to prevent more than one instance of the installer from running without giving the choice to the user, you could use the <singleInstanceCheck> rule and throw an error:
<preInstallationActionList>
<throwError>
<text>Another instance is running. This instance will abort</text>
<ruleList>
<singleInstanceCheck logic="is_running" />
</ruleList>
</throwError>
</preInstallationActionList>