0 Votes

Batch mode

Last modified by WikiBot on 2025/03/20 14:15

Batch mode

To run the IDA SE from the command prompt or from a batch file, use the command

path\idamod.exe [switches...] command

(in some IDA application the program name idamod may be replaced with the application name)

Here is the list of available commands (the optional parts are enclosed in square brackets []):

  
[-O] file[.idm][more files] Open one or more file (the key is optional)
-N app doctype [file[.idm]] Create a new document of given type and with given IDA application. The optional argument file gives an alternative template file.
-R file[.idm] [more files] Run file in the interactive (normal) mode
-B [logfile] files Run files in batch mode.
-X script Execute the script.
-B [logfile] -X script Execute the script in batch mode.

Here is the list of optional switches:

  
-C id Assigns an identification number. Required for running multiple IDA processes.
This switch should be first in the command line (otherwise ignored).
-A (feature_id ... ) Order network licenses for listed feature numbers (instead av ordering them interactivelly).
-D case Run in decoupled mode. The meaning depends on application.
-E run_case Run the named simulation. The list of simulations is defined in the application. The run_case may also be a script.
-F option[,option...] Set debug options.
Supported options: *store-solver-files*, *comment-ida*, *keep-db-resources*
-G code Fast start options. The code is the sum of requested options where 1 = skip licence warnings; 2 = skip updating databases; 4 = skip checking for upgrades, 8 = offline mode
-L "title" Redefine the title of the main window.
-Q  Execute the command and close IDA. Not applicable to commands -O (open) and -N (new).
-T "folder" Change the name of the subfolder in the temporary folder.
Note that -C also changes the subfolder name by adding .id to its name.
-V  Start in viewer mode. Use with -C viewer to avoid sending -V to a modeler instance running in non-viewer mode.
-W state Run with IDA window in given state (normal, maximized, icon, hidden).

In batch mode, IDA SE writes all messages to a log file rather than to the log window.

The list of files in batch mode may contain names with wildcards * and ? (in the file name only).

It may also contain references to response files in the form @file (without wildcards). The response file should contain a list of files separated by white space (space character, tab character, or line break).

The first file in the list of files is treated as the name of the log file, if it has an extension not equal to .idm.

Otherwise the name of the log file is generated from the first file by changing the extension to .log. If the first name contains wildcards, the name of the log file is idamod.log.

The file names may be enclosed in double quotes. This is required for names containing space characters.

The argument script may be:

  • A script command: (cmd arg1 ...)
  • A list of commands: ((cmd1 ...) ...)
  • File name optionally followed by script arguments: file var1 value1 ...

See also syntax of script arguments. Note that the syntax of file argument (described above) is different.

The space character after keys -O, -N, -R, -B and -X is optional.