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