1innoextract(1) General Commands Manual innoextract(1)
2
3
4
6 innoextract - tool to extract installers created by Inno Setup
7
9 innoextract [--extract] [--lowercase] [options] [--] installers ...
10
11 innoextract --list [options] [--] installers ...
12
13 innoextract --test [options] [--] installers ...
14
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
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
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 lo‐
94 cale and always use UTF-8 as the filesystem and standard output
95 encoding - the --codepage option only changes the input encod‐
96 ing. However, using codepage number "65001" instructs innoex‐
97 tract to assume all strings are already encoded as UTF-8 and to
98 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 be‐
120 longs to and/or a number to make the filename unique. The
121 language suffix (if applicable) is also appended to the
122 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 un‐
147 less that language matches the default language specified by the
148 --default-language. While the suffix is omitted for the default
149 language, no numbered suffix is added in it's place unless
150 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 ac‐
169 cordingly. 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 im‐
177 mediately.
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 en‐
219 abled 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 op‐
239 tion).
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 which can be
248 specified using the --output-dir option. If the output directory
249 does not exist it will be created and then removed after testing
250 is done. Parent directories are not created. Temporary files
251 created inside the directory are always removed.
252
253 Note that is option is geared towards GOG.com installers. Other
254 installers may come be bundled with different extraneous .bin
255 which this option might not be able to handle.
256
257 This option also forces re-assembly of GOG Galaxy file parts.
258 See the --no-gog-galaxy option for details.
259
260 --no-gog-galaxy
261 Some GOG.com installers contain files in GOG Galaxy format
262 (split into multiple parts that are individually compressed)
263 which are re-assembled using post-install scripts. By default
264 innoextract will try to re-assemble such files if it detects a
265 GOG.com installer. This option disables that.
266
267 GOG.com installers are detected using the publisher and URL
268 fields in the setup headers. Use the --gog option to force re‐
269 assembly for all installers.
270
271 --gog-game-id
272 Determine the ID used by GOG.com for the game contained in this
273 installer. This will only work with Galaxy-ready GOG.com in‐
274 stallers.
275
276 This option can be combined with --silent to print only the game
277 ID without additional syntax that would make consumption by
278 other scripts harder.
279
280 The --gog-game-id action can be combined with --list, --test,
281 --extract and/or --list-languages. If --silent and --gog-game-id
282 are combined with --list and/or --list-languages, the game ID
283 (or an empty line) will be printed on it's own line before the
284 file list but after the language list.
285
286 For newer multi-part GOG.com installers the .bin files are not
287 part of the Inno Setup installer but instead are RAR archives.
288 Some of these RAR files are encrypted, with the password being
289 the MD5 checksum of the game ID:
290
291 innoextract --gog-game-id --silent setup_....exe | md5sum |
292 cut -d ' ' -f 1
293
294 -h, --help
295 Show a list of the supported options.
296
297 -I, --include EXPR
298 If this option is specified, innoextract will only process files
299 whose path matches EXPR. The expression can be either a single
300 path component (a file or directory name) or a series of succes‐
301 sive path components joined by the OS path separator (\ on Win‐
302 dows, / elsewhere).
303
304 The expression is always matched against one or more full path
305 components. Filtering by parts of filenames is currently not
306 supported. Matching is done case-insensitively.
307
308 EXPR may contain one leading path separator, in which case the
309 rest of the expression is matched against the start of the path.
310 Otherwise, the expression is matched against any part of the
311 path.
312
313 The --include option may be repeated in order allow files match‐
314 ing against one of multiple patterns. If --include is not used,
315 all files are processed.
316
317 -i --info
318 This is a convenience option to enable all actions that print
319 information about the installer.
320
321 Scrips should not rely on the output format with this option and
322 should instead enable the individual actions instead.
323
324 Currently this option enables --list-languages, --gog-game-id
325 and --show-password.
326
327 --language LANG
328 Extract only language-independent files and files for the given
329 language. By default all files are extracted.
330
331 To also skip language-independent files, combine this option
332 with --language-only.
333
334 --language-only
335 Only extract files that are language-specific.
336
337 This option can be combined with --language to only extract the
338 files of a specific language.
339
340 --license
341 Show license information.
342
343 -l, --list
344 List files contained in the installer but don't extract any‐
345 thing.
346
347 This action also enables the --list-sizes action unless either
348 --quiet or --silent is specified.
349
350 This option can be combined with --silent to print only the
351 names of the contained files (one per line) without additional
352 syntax that would make consumption by other scripts harder.
353
354 The --list action can be combined with --test, --extract,
355 --list-languages and/or --gog-game-id to display the names of
356 the files as they are extracted even with --silent.
357
358 --list-checksums
359 List checksums for files contained in the installer.
360
361 This option implies the --list action and can be combined with
362 the --list-sizes option to print both the size and checksum for
363 each file.
364
365 With --silent the file checksum will be printed at the start of
366 the line (but after the file size if enabled with the
367 --list-sizes option) followed by a space. Otherwise the checksum
368 is printed after the file name.
369
370 The checksum type can be one of Adler32, CRC32, MD5 or SHA-1 and
371 is printed in fron of the checksum hash followed by a space.
372 Adler32 and CRC32 checksums are printed as "0x" followed by the
373 32-bit hexadecimal value.
374
375 Different files in the same installer can have different check‐
376 sum types if GOG Galaxy file part reassembly is not disabled us‐
377 ing the --no-gog-galaxy option.
378
379 --list-languages
380 List languages supported by the installer.
381
382 This option can be combined with --silent to print only the
383 identifiers of the languages (one per line) followed by a space
384 and then the language name, without additional syntax that would
385 make consumption by other scripts harder.
386
387 The --list-languages action can be combined with --list, --test,
388 --extract and/or --gog-game-id to display the available lan‐
389 guages before doing anything else. If --silent and --list-lan‐
390 guages are combined with --list and/or --gog-game-id, the lan‐
391 guages list will be terminated with an empty line and will pre‐
392 cede both the game ID and files list.
393
394 --list-sizes
395 List uncompressed sizes for files contained in the installer.
396
397 This option implies the --list action and can be combined with
398 the --list-checksums option to print both the size and checksum
399 for each file.
400
401 With --silent the file size in bytes will be printed at the
402 start of the line followed by a space. Otherwise the size is
403 printed after the file name in a human-friendly format.
404
405 -L, --lowercase
406 Convert filenames stored in the installer to lower-case before
407 extracting.
408
409 -d, --output-dir DIR
410 Extract all files into the given directory. By default, innoex‐
411 tract will extract all files to the current directory.
412
413 If the specified directory does not exist, it will be created.
414 However, the parent directory must exist or extracting will
415 fail.
416
417 -P, --password PASSWORD
418 Specifies the password to decrypt encrypted files. The password
419 is assumed to be encoded as UTF-8 and converted the internal en‐
420 coding according used in the installer as needed.
421
422 Use the --password-file option to load the password from a file
423 or standard input instead. This option cannot be combined with
424 --password-file.
425
426 If this password does not match the checksum stored in the in‐
427 staller, encrypted files will be skipped but unencrypted files
428 will still be extracted. Use the --check-password option to
429 abort processing entirely if the password is incorrect.
430
431 --password-file FILE
432 Load a password form the specified file. Only the first line ex‐
433 cluding the terminating carriage return and/or line break is
434 used as the password. The password is assumed to be encoded as
435 UTF-8 and converted the internal encoding according used in the
436 installer as needed.
437
438 If the special file name "-" is used, the password will be read
439 from standard input.
440
441 Use the --password option to specify the password on the com‐
442 mand-line instead. This option cannot be combined with --pass‐
443 word.
444
445 If this password does not match the checksum stored in the in‐
446 staller, encrypted files will be skipped but unencrypted files
447 will still be extracted. Use the --check-password option to
448 abort processing entirely if the password is incorrect.
449
450 -p, --progress[=ENABLE]
451 By default innoextract will try to detect if the terminal sup‐
452 ports shell escape codes and enable or disable progress bar out‐
453 put accordingly. Pass 1 or true to --progress to force progress
454 bar output. Pass 0 or false to never show a progress bar.
455
456 -q, --quiet
457 Less verbose output.
458
459 --show-password
460 Show checksum $c and salt $s used for the password $p check as
461 well as encoding of the password. The checksum is calculated
462 from the salt concatenated with the password:
463
464 $c = hash($s . $p)
465
466 With the --silent option, the checksum name and hash is printed
467 on one line seperated by a space followed by the salt encoded as
468 hex bytes and password encoding on separate lines.
469
470 Checksum types can be CRC32, MD5 or SHA-1 although CRC32 is not
471 used in installers with encryption.
472
473 Use the --password or --password-file option together with
474 --check-password to check if a password matches this checksum.
475
476 -s, --silent
477 Don't output anything except errors and warnings unless explic‐
478 itly requested and use a machine-readable output format.
479
480 This option can be combined with --list to print only the names
481 of the contained files (one per line) without additional syntax
482 that would make consumption by other scripts harder.
483
484 -t, --test
485 Test archive integrity but don't write any output files.
486
487 This option can be combined with --extract to abort on file
488 checksum errors.
489
490 -T, --timestamps TZ
491 Inno Setup installers can contain timestamps in both UTC and
492 'local' timezones.
493
494 The --timestamps option specifies what timezone should be used
495 to adjust these 'local' file times.
496
497 Valid values are those accepted by tzset in the TZ environment
498 variable, except with the direction of the time offset reversed:
499 both -T CET and -T GMT+1 will (when DST is in effect) give the
500 same result.
501
502 Besides timezones, two special values are accepted:
503
504
505 "none" Don't preserve file times for extracted files, both for
506 UTC and 'local' timestamps. The file times will be left
507 the way the OS set them when creating the output files.
508
509 "local" Use the system timezone for 'local' timestamps. This is
510 the normal Inno Setup behavior, and can be used together
511 with the TZ environment variable.
512
513 The default value for this option is UTC, causing innoextract to
514 not adjust 'local' file times. File times marked as UTC in the
515 Inno Setup file will never be adjusted no matter what --time‐
516 stamps is set to.
517
518 -v, --version
519 Print the innoextract version number and supported Inno Setup
520 versions.
521
522 If combined with the --silent option, only the version number is
523 printed. Otherwise, the output will contain the name (innoex‐
524 tract) followed by the version number on the first line, and,
525 unless the --quiet options is specified, the range of suuported
526 Inno Setup installer versions on the second line.
527
528 --no-warn-unused
529 By default, innoextract will print a warning if it encounters
530 .bin files that look like they could be part of the setup but
531 are not used. This option disables that warning.
532
534 Paths in Inno Setup installers can contain constants (variable or code
535 references) that are expanded at install time. innoextract expands all
536 such constants to their name and replaces unsafe characters with $.
537 For exmaple {app} is expanded to app while {code:Example} is expanded
538 to code$Example.
539
540 There is currently no way to configure this expansion except for dis‐
541 abling it with the --dump option.
542
544 0 Success
545
546 1 Syntax or usage error
547
548 2+ Broken or unsupported setup file, or input/output error
549
551 There is no support for extracting individual components and limited
552 support for filtering by name.
553
554 Included scripts and checks are not executed.
555
556 The mapping from Inno Setup constants like the application directory to
557 subdirectories is hard-coded.
558
559 Names for data slice/disk files in multi-file installers must follow
560 the standard naming scheme.
561
563 cabextract(1), unar(1), unrar(1), unshield(1), tzset(3)
564
566 Please report bugs to https://innoextract.constexpr.org/issues.
567
569 innoextract is distributed under the zlib/libpng license. See the LI‐
570 CENSE file for details.
571
572 A website is available at https://constexpr.org/innoextract/.
573
574 This program uses the excellent lzma/xz decompression library written
575 by Lasse Collin.
576
578 Daniel Scharrer (daniel@constexpr.org)
579
580
581
5821.9 (2020-08-09) innoextract(1)