innounp, the Inno Setup Unpacker
Version 0.40
Supports Inno Setup versions 2.0.7 through 5.5.4

Inno Setup is a popular program for making software installations. Unfortunately, there is no official unpacker - the only method of getting the files out of the self-extracting executable is to run it. One piece of software that addresses this issue is Sergei Wanin's InstallExplorer, a plug-in for the FAR Manager that unpacks several types of installations, including Inno Setup (IS). But since it is not updated in a timely fashion, and so does not support the latest IS most of the time, this program was born. The advantages over InstallExplorer are:

If you want to report a bug, request a feature, or discuss anything else related to the program, please write to the forum.

Both the source and the executable packages are compressed with WinRar. While the full-featured packer is shareware, the UnRar utility that can only extract files is free. And there are lots of free third-party programs that unpack rar just fine, e.g. 7-Zip.

As a bonus, a simple unpacker for Setup Factory installations is available on the download page. It is ripped from the SynCE project.

Usage

Innounp is a console application, and it uses command-line options to find out what to do. For a more human-friendly interface utilizing FAR or Total Commander as a front-end see the MultiArc section below. Windows Explorer fans: nullz has made some .reg scripts to add innounp into the right-click menu and Richard Santaella crafted a graphical wrapper for innounp (get it on the download page).

innounp [command] [options] <setup.exe or setup.0> [@filelist] [filemask ...]
Commands:
  (no)   display general installation info
  -v     verbosely list the files (with sizes and timestamps)
  -x     extract the files from the installation (to the current directory, also see -d)
  -e     extract files without paths
  -t     test files for integrity
Options:
  -b     batch (non-interactive) mode - will not prompt for password or disk changes
  -q     do not indicate progress while extracting
  -m     process internal embedded files (such as license and uninstall.exe)
  -pPASS decrypt the installation with a password
  -dDIR  extract the files into DIR (can be absolute or relative path)
  -cDIR  specifies that DIR is the current directory in the installation
  -n     don't attempt to unpack new versions
  -fFILE same as -p but reads the password from FILE
  -a     process all copies of duplicate files
  -y     assume Yes on all queries (e.g. overwrite files)  

If an installation has setup.0 (it is made without using SetupLdr), run innounp on setup.0 instead of setup.exe.

To extract all files from a specific directory, use dirname\*.*, not just dirname.

By default all files are extracted to the current directory. Use -d to override this behaviour. For example, -dUnpacked will create a directory named Unpacked inside the current directory and put the extracted files there.

The -c option is a little more tricky to explain. Suppose you opened an installation in a file manager and browsed to {app}\subdir\program.exe. Now if you copied program.exe to another location, the entire directory tree ({app}\subdir\) would be created and program.exe would be extracted there. -c notifies innounp that you are only interested in paths from the current directory and below, so that your file, program.exe, is extracted right where you intended to copy it, not several directory levels deeper. Note that in order to avoid confusion, files must still be specified by their full path names inside the installation.

Note that an installation can contain several identical files (possibly under different names). Inno Setup stores only one copy of such files, and by default innounp will also unpack one file. If you want to have all files that could ever be installed anywhere, regardless of how many identical files this may get you, -a option will do it.

If -m is specified, the file listing includes embedded\CompiledCode.bin which is the code made by the RemObjects Pascal Script compiler. It is possible to disassemble it using the ifps3_disasm.rar package on the download page. The result is not very readable though since it uses the basic 'disassembler' from IFPS3. Anyone wants to write a decompiler?

How to report bugs

OK, I know innounp is far from being perfect, but it is my intention to make the program usable. User feedback is a great way to achieve this. Here's what you should do if you find a bug and want it fixed.

Tell me what's wrong with innounp. If you encountered incorrect behaviour, say what you think it should do and what it actually does. If it crashed or gave an error message, say what did that - innounp, Windows, FAR, etc, and include the details.

Describe the exact steps necessary to reproduce the bug. Say what are the preconditions. Is the bug specific to some system settings? To a setup file you have? (include the problem part of the installation script or a link to the compiled setup, if it is small enough) To an IS version? To something else? Or does the bug occur regardless of these things?

Once you have the bug report ready, post it to the forum. Remember, if I can't reproduce the bug using the description you gave, the chances that it will be fixed fall dramatically.

If the above guidelines were not obvious for you, I suggest that you read the following articles.

How to Ask Questions the Smart Way by Eric Raymond
How to Report Bugs Effectively by Simon Tatham

What's new / History

0.40 (2013.12.20)

0.39 (2013.07.12)

0.38 (2013.02.01)

0.37 (2012.06.02)

0.36 (2011.06.01)

0.35 (2010.10.01)

0.34 (2010.09.16)

0.33 (2010.07.05)

0.32 (2010.06.14)

0.31 (2010.04.19)

0.30 (2010.04.12)

0.29 (2010.02.19)

0.28 (2010.01.14)

0.27 (2009.12.04)

0.26 (2009.11.30)

0.25 (2009.11.26)

0.24 (2009.11.20)

0.23 (2009.09.25)

0.22 (2009.08.24)

0.21 (2009.04.24)

0.20 (2008.05.23)

0.19 (2007.02.23)

0.18 (2006.11.23)

0.17 (2005.08.31)

0.16 (2005.04.30)

0.15 (2005.03.08)

0.14 (2004.10.14)

0.13 (2004.08.26)

0.12 (2004.07.28)

0.11 (2004.05.04)

0.10 (2004.04.26)

0.09 (2004.04.22)

0.08 (2004.04.14)

0.07 (2004.03.16)

0.06 (2004.03.11)

0.05 (2004.03.09)

0.04 (2004.02.27)

MultiArc settings

Unless you are a die-hard fan of command line, you may like the idea of working with IS installations like with conventional archives in a file manager. Right now two programs support this: FAR and Total Commander. Below are the instructions how to integrate innounp into each.

FAR

Copy innounp.exe to a directory in your PATH and edit your FAR\Plugins\MultiArc\Formats\Custom.ini file. There are two alternate settings differing in several aspects and each having its own pros and cons. Try the recommended setting first, if it does not work well for you, try the other setting or even combine them.

Co-operation with InstallExplorer

If you have InstallExplorer installed (or another plug-in that handles IS, but you will need to adjust the settings accordingly), you might want to let it process all the other types of installations but keep IS installations for innounp. FAR does not provide a means of customizing the plug-in call order; however, an empirical study has shown that it loads plug-ins and applies them to files in lexical order. So the solution is to rename InstallExplorer's dll file from 6InstExpl.dll to e.g. zInstExpl.dll (and restart FAR).

FAR: recommended setting

[InnoSetup5]
TypeName=InnoSetup5
ID=49 6E 6E 6F 20 53 65 74 75 70 20 53 65 74 75 70 20 44 61 74 61 20 28 35 2E
IDOnly=1
List=innounp -v -m
Errorlevel=1
Start="^---------"
End="^---------"
Format0="/^\s+(?P<size>\d+)\s+(?P<mYear>\d+)\.(?P<mMonth>\d+)\.(?P<mDay>\d+)\s+(?P<mHour>\d+):(?P<mMin>\d+)\s+(?P<name>.*)$/i"
Extract=innounp -x -m {-c%%R} %%A {@%%LMQ}
ExtractWithoutPath=innounp -e -m {-c%%R} %%A {@%%LMQ}
Test=innounp -t -m %%A
AllFilesMask="*.*"

[InnoSetup4]
TypeName=InnoSetup4
ID=49 6E 6E 6F 20 53 65 74 75 70 20 53 65 74 75 70 20 44 61 74 61 20 28 34 2E
IDOnly=1
List="innounp -v -m"
Errorlevel=1
Start="^---------"
End="^---------"
Format0="/^\s+(?P<size>\d+)\s+(?P<mYear>\d+)\.(?P<mMonth>\d+)\.(?P<mDay>\d+)\s+(?P<mHour>\d+):(?P<mMin>\d+)\s+(?P<name>.*)$/i"
Extract=innounp -x -m {-c%%R} %%A {@%%LMQ}
ExtractWithoutPath=innounp -e -m {-c%%R} %%A {@%%LMQ}
Test=innounp -t -m %%A
AllFilesMask="*.*"

[InnoSetup3]
TypeName=InnoSetup3
ID=49 6E 6E 6F 20 53 65 74 75 70 20 53 65 74 75 70 20 44 61 74 61 20 28 33 2E
IDOnly=1
List="innounp -v -m"
Errorlevel=1
Start="^---------"
End="^---------"
Format0="/^\s+(?P<size>\d+)\s+(?P<mYear>\d+)\.(?P<mMonth>\d+)\.(?P<mDay>\d+)\s+(?P<mHour>\d+):(?P<mMin>\d+)\s+(?P<name>.*)$/i"
Extract=innounp -x -m {-c%%R} %%A {@%%LMQ}
ExtractWithoutPath=innounp -e -m {-c%%R} %%A {@%%LMQ}
Test=innounp -t -m %%A
AllFilesMask="*.*"

[InnoSetup2]
TypeName=InnoSetup2
ID=49 6E 6E 6F 20 53 65 74 75 70 20 53 65 74 75 70 20 44 61 74 61 20 28 32 2E
IDOnly=1
List="innounp -v -m"
Errorlevel=1
Start="^---------"
End="^---------"
Format0="/^\s+(?P<size>\d+)\s+(?P<mYear>\d+)\.(?P<mMonth>\d+)\.(?P<mDay>\d+)\s+(?P<mHour>\d+):(?P<mMin>\d+)\s+(?P<name>.*)$/i"
Extract=innounp -x -m {-c%%R} %%A {@%%LMQ}
ExtractWithoutPath=innounp -e -m {-c%%R} %%A {@%%LMQ}
Test=innounp -t -m %%A
AllFilesMask="*.*"

FAR: alternate setting

Will not work for IS 5.1.5 and up because new versions no longer have this signature.
[InnoSetup]
TypeName=InnoSetup
ID=49 6E 6E 6F
IDPos=48
Extension=exe
List="innounp -v -m"
Errorlevel=1
Start="^---------"
End="^---------"
Format0="zzzzzzzzzz  yyyy tt dd hh:mm  nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=innounp -x -m {-c%%R} %%A {@%%LMQ}
ExtractWithoutPath=innounp -e -m {-c%%R} %%A {@%%LMQ}
AllFilesMask="*.*"

Total Commander

Will not work for IS 5.1.5 and up because new versions no longer have this signature. I guess the version-specific settings from above have to be cloned.

Configuration made up by Gnozal and Maxwish and posted on TC forum. Change the path below to where you have innounp installed and add this to your MultiArc.ini. Note that MultiArc is not included in the default TC installation, instead it is available as a separate download from Siarzhuk Zharski's web site. Refer to the help file for information on any additional configuration necessary.

[InnoSetup]
Description="InnoSetup"
Archiver=C:\PROGRAM FILES\WINCMD\WCXPlugin\MultiArc\innounp.exe
Extension=exe
ID=49 6E 6E 6F
IDPos=48
Start="^--------------------------------------"
End="^--------------------------------------"
Format0="zzzzzzzzzz  yyyy.tt.dd hh:mm  nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
List=%P -v -m %AQ
Extract=%P -e -m -c%R %AQ @%LQ
ExtractWithPath=%P -x -m -c%R %AQ @%LQ
IgnoreErrors=0
SkipEmpty=0
SkipDirsInFileList=0
SearchForUglyDirs=0
BatchUnpack=1
UnixPath=0
AskMode=0
SkipLIST=1
Debug=0

Copyrights and licensing

Copyright © 2004-2013 QuickeneR, 2009-2013 Ariman
This program is licensed under the terms of the GNU General Public License (GPL). A copy of the license is included with the source files.
If you distribute innounp on the WWW, please put a link to its home page, http://innounp.sourceforge.net

Over 90% of code is ripped from Inno Setup which is Copyright © 1997-2010 Jordan Russell. All rights reserved.
Portions Copyright © 2000-2006 Martijn Laan. All rights reserved.
See http://www.jrsoftware.org for details.

Contains zlib code, Copyright © 1995-2005 Jean-loup Gailly and Mark Adler.

Contains bzip2 code, Copyright © 1996-2009 Julian R Seward. All rights reserved.

Contains LZMA code, Copyright © 1999-2009 Igor Pavlov.


Innerfuse Pascal Script is Copyright © 2000-2004 by Carlo Kok, Innerfuse.

StripReloc is Copyright © 1999-2005 Jordan Russell, www.jrsoftware.org


SourceForge.net