Igor’s tip of the week #63: IDA installer command-line options

Most users probably run IDA installers in standard, interactive mode. However, they also can be run in unattended mode (e.g. for automatic, non-interactive installation).

Available options

To get the list of available options, run the installer with the --help argument. For example, here’s the list on Linux:

igor@/home/igor$ ./idapronl[...].run --help
IDA Pro and Hex-Rays Decompilers (x86, x64, ARM, ARM64, PPC, PPC64, MIPS) 7.6 7.6
Usage:

–help Display the list of valid options

–version Display product information

–unattendedmodeui <unattendedmodeui> Unattended Mode UI
Default: none
Allowed: none minimal minimalWithDialogs

–optionfile <optionfile> Installation option file
Default:

–debuglevel <debuglevel> Debug information level of verbosity
Default: 2
Allowed: 0 1 2 3 4

–mode <mode> Installation mode
Default: gtk
Allowed: gtk xwindow text unattended

–debugtrace <debugtrace> Debug filename
Default:

–installer-language <installer-language> Language selection
Default: en
Allowed: sq ar es_AR az eu pt_BR bg ca hr cs da nl en et fi fr de el he hu id it ja kk ko lv lt no fa pl pt ro ru sr zh_CN sk sl es sv th zh_TW tr tk uk va vi cy

–prefix <prefix> Installation Directory
Default: /home/igor/idapro-7.6

–python_version <python_version> IDAPython Version
Default: 3
Allowed: 2 3

–installpassword <installpassword> Installation password
Default:

For example, to run the installer in text (console) instead of GUI mode, specify --mode text.

On Windows, the set of options is slightly different (and is shown in a GUI dialog instead of console):

IDA Pro and Hex-Rays Decompilers (x86, x64, ARM, ARM64, PPC, PPC64, MIPS) 7.6 7.6
Usage:

–help Display the list of valid options

–version Display product information

–unattendedmodeui <unattendedmodeui> Unattended Mode UI
Default: none
Allowed: none minimal minimalWithDialogs

–optionfile <optionfile> Installation option file
Default:

–debuglevel <debuglevel> Debug information level of verbosity
Default: 2
Allowed: 0 1 2 3 4

–mode <mode> Installation mode
Default: win32
Allowed: win32 unattended

–debugtrace <debugtrace> Debug filename
Default:

–installer-language <installer-language> Language selection
Default: en
Allowed: sq ar es_AR az eu pt_BR bg ca hr cs da nl en et fi fr de el he hu id it ja kk ko lv lt no fa pl pt ro ru sr zh_CN sk sl es sv th zh_TW tr tk uk va vi cy

–prefix <prefix> Installation Directory
Default: C:\Program Files/idapro-7.6

–python_version <python_version> IDAPython Version
Default: 3
Allowed: 2 3

–installpassword <installpassword> Installation password
Default:

–install_python <install_python> Install Python 3
Default:

In partcular, --install_python option allows to enable installation of the bundled Python 3 (useful for machines without Python preinstalled). On Linux and Mac, the system-wide Python is presumed to be available

Using the option file

Especially for unattended mode, you may need to specify multiple options (install path, Python version, installation password etc.). Instead of passing them all on the command line, you can use the option file:

  1. Create a simple text file with a list of option=value lines. The option names are those from the usage screen without the leading --.
  2. Pass the filename to the installer using the --optionfile <filename> switch.

For example, here’s a file for unattended install for Python 3:

installpassword=mypassword
prefix=/home/igor/ida-7.6
mode=unattended
python_version=3

Running Mac installer from command line

Because the Mac installer is not a single binary but an app bundle, you need to pass arguments to the executable inside the bundle, for example:

ida[...].app/Contents/MacOS/installbuilder.sh --mode text

Uninstaller options

The uninstaller can also be run with commandline opions:

~/idapro-7.6/uninstall --mode unattended

 

Article Link: Igor’s tip of the week #63: IDA installer command-line options – Hex Rays