1innoextract(1)              General Commands Manual             innoextract(1)
2
3
4

NAME

6       innoextract - tool to extract installers created by Inno Setup
7

SYNOPSIS

9       innoextract [--extract] [--lowercase] [options] [--] installers ...
10
11       innoextract --list [options] [--] installers ...
12
13       innoextract --test [options] [--] installers ...
14

DESCRIPTION

16       innoextract is a tool that can extract installer executables created by
17       Inno Setup.
18
19       innoextract will extract files from installers specified on the command
20       line.
21
22       To  extract  a  multi-part installer with external data files, only the
23       executable (.exe) file needs to be given as an argument to innoextract.
24

OPTIONS SUMMARY

26       Here is a short summary of the options available in innoextract. Please
27       refer to the detailed  documentation below for a complete description.
28
29       Generic options:
30               -h --help               Show supported options
31               -v --version            Print version information
32                  --license            Show license information
33
34       Actions:
35               -t --test               Only verify checksums, don't write anything
36               -e --extract            Extract files (default action)
37               -l --list               Only list files, don't write anything
38                  --list-sizes         List file sizes
39                  --list-checksums     List file checksums
40               -i --info               Print information about the installer
41                  --list-languages     List languages supported by the installer
42                  --gog-game-id        Determine the GOG.com game ID for this installer
43                  --show-password      Show password check information
44                  --check-password     Abort if the password is incorrect
45               -V --data-version       Only print the data version
46
47       Modifiers:
48                  --codepage CODEPAGE  Encoding for ANSI strings
49                  --collisions ACTION  How to handle duplicate files
50                  --default-language   Default language for renaming
51                  --dump               Dump contents without converting filenames
52               -L --lowercase          Convert extracted filenames to lower-case
53               -T --timestamps TZ      Timezone for file times or "local" or "none"
54               -d --output-dir DIR     Extract files into the given directory
55               -P --password PASSWORD  Password for encrypted files
56                  --password-file FILE File to load password from
57               -g --gog                Process additional archives from GOG.com installers
58                  --no-gog-galaxy      Don't re-assemble GOG Galaxy file parts
59               -n --no-extract-unknown Don't extract unknown Inno Setup versions
60
61       Filters:
62               -m --exclude-temp       Don't extract temporary files
63                  --language LANG      Extract only files for this language
64                  --language-only      Only extract language-specific files
65               -I --include EXPR       Extract only files that match this path
66
67       Display options:
68               -q --quiet              Output less information
69               -s --silent             Output only error/warning information
70                  --no-warn-unused     Don't warn on unused .bin files
71               -c --color[=ENABLE]     Enable/disable color output
72               -p --progress[=ENABLE]  Enable/disable the progress bar
73

OPTIONS

75       --     Treat  all arguments after this one as files, even if they begin
76              with a dash.
77
78       --check-password
79              Abort processing if the password provided using  the  --password
80              or  --password-file option does not match the checksum stored in
81              the installer.
82
83              The password checksum used for this check can be retrieved using
84              the --show-password option.
85
86       --codepage CODEPAGE
87              Non-Unicode  versions of Inno Setup store strings in an unspeci‐
88              fied encoding. By default, innoextract will guess  the  encoding
89              from  the  installer's  language  list,  falling  back  to  Win‐
90              dows-1252. This option can be used to  override  that  guess  by
91              specifying a non-zero Windows codepage number to use.
92
93              On  non-Windows  platforms,  innoextract  will ignore the system
94              locale and always use UTF-8 as the filesystem and standard  out‐
95              put  encoding  -  the  --codepage  option only changes the input
96              encoding.  However,  using  codepage  number  "65001"  instructs
97              innoextract  to  assume all strings are already encoded as UTF-8
98              and to output them without conversion.
99
100              This option has no effect with Unicode-enabled installers, which
101              always  use  UTF-16LE.  Invalid UTF-16 data is represented using
102              the WTF-8 encoding which is a straightforward extension of UTF-8
103              to represent unpaired UTF-16 surrogate code units.
104
105       --collisions ACTION
106              Inno  Setup installers can contain duplicate files with the same
107              name. This option tells innoextract what to do when such a  col‐
108              lisions is encountered. Valid actions are:
109
110
111              "overwrite"
112                     Extract  only  one  of the colliding files. The choice is
113                     done similar to how Inno Setup  overwrites  files  during
114                     installation. This is the default.
115
116              "rename"
117                     Rename  files  that would be overwritten using the "over‐
118                     write" action by appending  a  suffix  comprised  of  the
119                     file's  language,  its  architecture,  the  component  it
120                     belongs to and/or a number to make the  filename  unique.
121                     The  language  suffix (if applicable) is also appended to
122                     the default file that would have been extracted with  the
123                     "overwrite" action.
124
125              "rename-all"
126                     Rename  all  colliding  files  by appending a suffix com‐
127                     prised of the file's language, its architecture, the com‐
128                     ponent it belongs to and/or a number to make the filename
129                     unique. The complete suffix is  appended  to  both  files
130                     that  would  have  been overwritten using the "overwrite"
131                     action and to those that  would  have  overwritten  other
132                     files.
133
134              "error"
135                     Exit when a collision is detected.
136
137              Rename rules:
138
139              1.  If the component is not the same for all files in the colli‐
140              sion set (all  files  with  the  same  filename),  "#"  (without
141              quotes)  followed  by  the component id is appended to all files
142              that are specific to a single component.
143
144              2. If the language is not the same for all files in  the  colli‐
145              sion  set,  "@"  (without quotes) followed by the language id is
146              appended to all files that are specific  to  a  single  language
147              unless  that  language matches the default language specified by
148              the --default-language. While the  suffix  is  omitted  for  the
149              default  language,  no  numbered  suffix  is added in it's place
150              unless needed to make the filename unique.
151
152              3. If the architecture is not the same for all files in the col‐
153              lision set, "@32bit" or "@64bit" (without quotes) is appended to
154              all files that are specific to a single architecture.
155
156              4. If no suffix was added by the previous steps, or if the file‐
157              name  is  not  yet  unique, "$" (without quotes) followed by the
158              lowest integer (starting at 0) to make the  filename  unique  is
159              appended.
160
161              With  the  "rename"  action,  steps  1 and 3 are only applied to
162              files that would have been overwritten by the "overwrite" action
163              while  "rename-all"  applies  them to all files in the collision
164              set.
165
166       -c, --color[=ENABLE]
167              By default innoextract will try to detect if the  terminal  sup‐
168              ports  shell  escape  codes  and  enable or disable color output
169              accordingly. Specifically, colors will be enabled if both stdout
170              and  stderr point to a TTY, the TERM environment variable is not
171              set to "dumb" and the NO_COLOR environment  variable  is  unset.
172              Pass 1 or true to --color to force color output. Pass 0 or false
173              to never output color codes.
174
175       -V, --data-version
176              Print the Inno Setup data version  of  the  installer  and  exit
177              immediately.
178
179              The  version  printed using this option is the one stored in the
180              setup file and can differ from the version  printed  with  other
181              actions as the stored data version is not always correct.
182
183              This  option can be used to determine if a file is an Inno Setup
184              installer without loading any compressed headers.
185
186              This option cannot be combined with any other action.
187
188       --default-language LANG
189              Set a language as the default.
190
191              With --collisions=overwrite (the default) this will  change  the
192              choice  of  which  file  to keep to always prefer the given lan‐
193              guage. In effect, --default-language behaves almost like  --lan‐
194              guage, except that files are extracted for all languages if they
195              have different names.
196
197              When using the  --collisions=rename  option,  --default-language
198              chooses  a language for which the files should keep the original
199              name if possible.
200
201       --dump Don't convert Windows paths to UNIX paths and  don't  substitute
202              constants in paths.
203
204              When combining --dump with --extract innoextract will not ensure
205              that the paths don't point outside  the  destination  directory.
206              Use this option with caution when handling untrusted files.
207
208       -m, --exclude-temp
209              Don't  extract  files that would have been deleted at the end of
210              the install process. Such files are marked with  [temp]  in  the
211              file listing.
212
213              This option takes precedence over --include and --language: tem‐
214              porary files are never extracted when using the  --exclude-temp,
215              even if they match the selected language or include expressions.
216
217       -e, --extract
218              Extract  all  files  to  the  current  directory. This action is
219              enabled  by  default,  unless  one  or  more  of   the   --list,
220              --list-sizes,    --list-checksums,   --test,   --list-languages,
221              --gog-game-id, --show-password or --check-password  actions  are
222              specified.
223
224              By  default  innoextract  will  continue after encountering file
225              checksum errors. The  --extract  option  can  be  combined  with
226              --test to abort on checksum errors.
227
228       -n, --no-extract-unknown
229              By  default  innoextract  will try to extract installers with an
230              unknown Inno Setup data version by treating it  as  the  closest
231              known version. This option tells innoextract to abort instead.
232
233       -g, --gog
234              Try to process additional .bin files that have the same basename
235              as the setup but are not actually part of  the  Inno  Setup  in‐
236              staller.  This is the case for newer multi-part GOG.com install‐
237              ers where these .bin files are RAR archives, potential encrypted
238              with  the  MD5  checksum  of  the game ID (see the --gog-game-id
239              option).
240
241              Extracting these RAR archives requires rar, unrar  or  lsar/unar
242              command-line utilities to be in the PATH.
243
244              The  --list,  --test,  --extract  and  --output-dir  options are
245              passed along to unrar/unar, but other options may be ignored for
246              the  RAR files. For multi-part RAR archives, the --test requires
247              a writable output directory for temporary files.
248
249              Note that is option is geared towards GOG.com installers.  Other
250              installers  may  come  be bundled with different extraneous .bin
251              which this option might not be able to handle.
252
253              This option also forces re-assembly of GOG  Galaxy  file  parts.
254              See the --no-gog-galaxy option for details.
255
256       --no-gog-galaxy
257              Some  GOG.com  installers  contain  files  in  GOG Galaxy format
258              (split into multiple parts  that  are  individually  compressed)
259              which  are  re-assembled  using post-install scripts. By default
260              innoextract will try to re-assemble such files if it  detects  a
261              GOG.com installer. This option disables that.
262
263              GOG.com  installers  are  detected  using  the publisher and URL
264              fields in the setup headers.  Use  the  --gog  option  to  force
265              reassembly for all installers.
266
267       --gog-game-id
268              Determine  the ID used by GOG.com for the game contained in this
269              installer. This will only work  with  Galaxy-ready  GOG.com  in‐
270              stallers.
271
272              This option can be combined with --silent to print only the game
273              ID without additional syntax  that  would  make  consumption  by
274              other scripts harder.
275
276              The  --gog-game-id  action  can be combined with --list, --test,
277              --extract and/or --list-languages. If --silent and --gog-game-id
278              are  combined  with  --list and/or --list-languages, the game ID
279              (or an empty line) will be printed on it's own line  before  the
280              file list but after the language list.
281
282              For  newer  multi-part GOG.com installers the .bin files are not
283              part of the Inno Setup installer but instead are  RAR  archives.
284              Some  of  these RAR files are encrypted, with the password being
285              the MD5 checksum of the game ID:
286
287                innoextract --gog-game-id --silent setup_....exe  |  md5sum  |
288              cut -d ' ' -f 1
289
290       -h, --help
291              Show a list of the supported options.
292
293       -I, --include EXPR
294              If this option is specified, innoextract will only process files
295              whose path matches EXPR. The expression can be either  a  single
296              path component (a file or directory name) or a series of succes‐
297              sive path components joined by the OS path separator (\ on  Win‐
298              dows, / elsewhere).
299
300              The  expression  is always matched against one or more full path
301              components. Filtering by parts of  filenames  is  currently  not
302              supported. Matching is done case-insensitively.
303
304              EXPR  may  contain one leading path separator, in which case the
305              rest of the expression is matched against the start of the path.
306              Otherwise,  the  expression  is  matched against any part of the
307              path.
308
309              The --include option may be repeated in order allow files match‐
310              ing  against one of multiple patterns. If --include is not used,
311              all files are processed.
312
313       -i --info
314              This is a convenience option to enable all  actions  that  print
315              information about the installer.
316
317              Scrips should not rely on the output format with this option and
318              should instead enable the individual actions instead.
319
320              Currently this option  enables  --list-languages,  --gog-game-id
321              and --show-password.
322
323       --language LANG
324              Extract  only language-independent files and files for the given
325              language. By default all files are extracted.
326
327              To also skip language-independent  files,  combine  this  option
328              with --language-only.
329
330       --language-only
331              Only extract files that are language-specific.
332
333              This  option can be combined with --language to only extract the
334              files of a specific language.
335
336       --license
337              Show license information.
338
339       -l, --list
340              List files contained in the installer  but  don't  extract  any‐
341              thing.
342
343              This  action  also enables the --list-sizes action unless either
344              --quiet or --silent is specified.
345
346              This option can be combined with  --silent  to  print  only  the
347              names  of  the contained files (one per line) without additional
348              syntax that would make consumption by other scripts harder.
349
350              The --list  action  can  be  combined  with  --test,  --extract,
351              --list-languages  and/or  --gog-game-id  to display the names of
352              the files as they are extracted even with --silent.
353
354       --list-checksums
355              List checksums for files contained in the installer.
356
357              This option implies the --list action and can be  combined  with
358              the  --list-sizes option to print both the size and checksum for
359              each file.
360
361              With --silent the file checksum will be printed at the start  of
362              the   line  (but  after  the  file  size  if  enabled  with  the
363              --list-sizes option) followed by a space. Otherwise the checksum
364              is printed after the file name.
365
366              The checksum type can be one of Adler32, CRC32, MD5 or SHA-1 and
367              is printed in fron of the checksum hash  followed  by  a  space.
368              Adler32  and CRC32 checksums are printed as "0x" followed by the
369              32-bit hexadecimal value.
370
371              Different files in the same installer can have different  check‐
372              sum  types  if  GOG  Galaxy file part reassembly is not disabled
373              using the --no-gog-galaxy option.
374
375       --list-languages
376              List languages supported by the installer.
377
378              This option can be combined with  --silent  to  print  only  the
379              identifiers  of the languages (one per line) followed by a space
380              and then the language name, without additional syntax that would
381              make consumption by other scripts harder.
382
383              The --list-languages action can be combined with --list, --test,
384              --extract and/or --gog-game-id to  display  the  available  lan‐
385              guages  before  doing anything else. If --silent and --list-lan‐
386              guages are combined with --list and/or --gog-game-id,  the  lan‐
387              guages  list will be terminated with an empty line and will pre‐
388              cede both the game ID and files list.
389
390       --list-sizes
391              List uncompressed sizes for files contained in the installer.
392
393              This option implies the --list action and can be  combined  with
394              the  --list-checksums option to print both the size and checksum
395              for each file.
396
397              With --silent the file size in bytes  will  be  printed  at  the
398              start  of  the  line  followed by a space. Otherwise the size is
399              printed after the file name in a human-friendly format.
400
401       -L, --lowercase
402              Convert filenames stored in the installer to  lower-case  before
403              extracting.
404
405       -d, --output-dir DIR
406              Extract  all files into the given directory. By default, innoex‐
407              tract will extract all files to the current directory.
408
409              If the specified directory does not exist, it will  be  created.
410              However,  the  parent  directory  must  exist or extracting will
411              fail.
412
413       -P, --password PASSWORD
414              Specifies the password to decrypt encrypted files. The  password
415              is  assumed  to  be  encoded as UTF-8 and converted the internal
416              encoding according used in the installer as needed.
417
418              Use the --password-file option to load the password from a  file
419              or  standard  input instead. This option cannot be combined with
420              --password-file.
421
422              If this password does not match the checksum stored in  the  in‐
423              staller,  encrypted  files will be skipped but unencrypted files
424              will still be extracted.  Use  the  --check-password  option  to
425              abort processing entirely if the password is incorrect.
426
427       --password-file FILE
428              Load  a  password  form  the specified file. Only the first line
429              excluding the terminating carriage return and/or line  break  is
430              used  as  the password. The password is assumed to be encoded as
431              UTF-8 and converted the internal encoding according used in  the
432              installer as needed.
433
434              If  the special file name "-" is used, the password will be read
435              from standard input.
436
437              Use the --password option to specify the password  on  the  com‐
438              mand-line  instead.  This option cannot be combined with --pass‐
439              word.
440
441              If this password does not match the checksum stored in  the  in‐
442              staller,  encrypted  files will be skipped but unencrypted files
443              will still be extracted.  Use  the  --check-password  option  to
444              abort processing entirely if the password is incorrect.
445
446       -p, --progress[=ENABLE]
447              By  default  innoextract will try to detect if the terminal sup‐
448              ports shell escape codes and enable or disable progress bar out‐
449              put  accordingly. Pass 1 or true to --progress to force progress
450              bar output. Pass 0 or false to never show a progress bar.
451
452       -q, --quiet
453              Less verbose output.
454
455       --show-password
456              Show checksum $c and salt $s used for the password $p  check  as
457              well  as  encoding  of  the password. The checksum is calculated
458              from the salt concatenated with the password:
459
460               $c = hash($s . $p)
461
462              With the --silent option, the checksum name and hash is  printed
463              on one line seperated by a space followed by the salt encoded as
464              hex bytes and password encoding on separate lines.
465
466              Checksum types can be CRC32, MD5 or SHA-1 although CRC32 is  not
467              used in installers with encryption.
468
469              Use  the  --password  or  --password-file  option  together with
470              --check-password to check if a password matches this checksum.
471
472       -s, --silent
473              Don't output anything except errors and warnings unless  explic‐
474              itly requested and use a machine-readable output format.
475
476              This  option can be combined with --list to print only the names
477              of the contained files (one per line) without additional  syntax
478              that would make consumption by other scripts harder.
479
480       -t, --test
481              Test archive integrity but don't write any output files.
482
483              This  option  can  be  combined  with --extract to abort on file
484              checksum errors.
485
486       -T, --timestamps TZ
487              Inno Setup installers can contain timestamps  in  both  UTC  and
488              'local' timezones.
489
490              The  --timestamps  option specifies what timezone should be used
491              to adjust these 'local' file times.
492
493              Valid values are those accepted by tzset in the  TZ  environment
494              variable, except with the direction of the time offset reversed:
495              both -T CET and -T GMT+1 will (when DST is in effect)  give  the
496              same result.
497
498              Besides timezones, two special values are accepted:
499
500
501              "none"  Don't  preserve file times for extracted files, both for
502                     UTC and 'local' timestamps. The file times will  be  left
503                     the way the OS set them when creating the output files.
504
505              "local"  Use the system timezone for 'local' timestamps. This is
506                     the normal Inno Setup behavior, and can be used  together
507                     with the TZ environment variable.
508
509              The default value for this option is UTC, causing innoextract to
510              not adjust 'local' file times. File times marked as UTC  in  the
511              Inno  Setup  file  will never be adjusted no matter what --time‐
512              stamps is set to.
513
514       -v, --version
515              Print the innoextract version number and  supported  Inno  Setup
516              versions.
517
518              If combined with the --silent option, only the version number is
519              printed. Otherwise, the output will contain  the  name  (innoex‐
520              tract)  followed  by  the version number on the first line, and,
521              unless the --quiet options is specified, the range of  suuported
522              Inno Setup installer versions on the second line.
523
524       --no-warn-unused
525              By  default,  innoextract  will print a warning if it encounters
526              .bin files that look like they could be part of  the  setup  but
527              are not used. This option disables that warning.
528

PATH CONSTANTS

530       Paths  in Inno Setup installers can contain constants (variable or code
531       references) that are expanded at install time. innoextract expands  all
532       such  constants  to  their name  and replaces unsafe characters with $.
533       For exmaple {app} is expanded to app while {code:Example}  is  expanded
534       to code$Example.
535
536       There  is  currently no way to configure this expansion except for dis‐
537       abling it with the --dump option.
538

EXIT VALUES

540       0      Success
541
542       1      Syntax or usage error
543
544       2+     Broken or unsupported setup file, or input/output error
545

LIMITATIONS

547       There is no support for extracting individual  components  and  limited
548       support for filtering by name.
549
550       Included scripts and checks are not executed.
551
552       The mapping from Inno Setup constants like the application directory to
553       subdirectories is hard-coded.
554
555       Names for data slice/disk files in multi-file  installers  must  follow
556       the standard naming scheme.
557

SEE ALSO

559       cabextract(1), unar(1), unrar(1), unshield(1), tzset(3)
560

BUGS

562       Please report bugs to http://innoextract.constexpr.org/issues.
563

CREDITS

565       innoextract  is  distributed  under  the  zlib/libpng license.  See the
566       LICENSE file for details.
567
568       A website is available at http://constexpr.org/innoextract/.
569
570       This program uses the excellent lzma/xz decompression  library  written
571       by Lasse Collin.
572

AUTHOR

574       Daniel Scharrer (daniel@constexpr.org)
575
576
577
5781.8                              (2019-09-15)                   innoextract(1)
Impressum