32

I am trying to extract the file-contents of an InstallShield setup.exe-file. (My plan is to use it in a back-office tool, so this must be done programmatically without any user interactions.)

Is this possible?
(Initial research seems to indicate it will fail.)

If it is possible to have a generic solution, for all recent versions of InstallShield that would be best.
Otherwise, if a solution only works for some versions of InstallShield it would be a step on the way. (It would probably be possible to deduce which InstallShield version a setup.exe is by looking at version resources of the exe-file.

I found that some InstallShield versions support /b or /extract_all. However there is no good way of knowing, just launching the exe and hoping it will extract and terminate orderly rather then displaying GUI dialogs doesn't seem like a good solution. So I am therefore looking for a more stable way.
Ideas welcome.

leiflundgren
  • 2,876
  • 7
  • 35
  • 53

5 Answers5

41

There's no supported way to do this, but won't you have to examine the files related to each installer to figure out how to actually install them after extracting them? Assuming you can spend the time to figure out which command-line applies, here are some candidate parameters that normally allow you to extract an installation.

MSI Based (may not result in a usable image for an InstallScript MSI installation):

  • setup.exe /a /s /v"/qn TARGETDIR=\"choose-a-location\""

    or, to also extract prerequisites (for versions where it works),

  • setup.exe /a"choose-another-location" /s /v"/qn TARGETDIR=\"choose-a-location\""

InstallScript based:

  • setup.exe /s /extract_all

Suite based (may not be obvious how to install the resulting files):

  • setup.exe /silent /stage_only ISRootStagePath="choose-a-location"
Michael Urman
  • 15,737
  • 2
  • 28
  • 44
  • 2
    FWIW Michael works for InstallShield. Also I'm thinking you might be able to infer what kind of setup.exe it is by looking for embedded resources or examining DLL dependencies. I see an MSI setup.exe had a dependency on MSI.dll. I'm guessing an InstallScript EXE would not. – Christopher Painter Jan 03 '12 at 15:58
  • 1
    See a [**similar answer here**](http://stackoverflow.com/a/24987512/129130) with a [link to a pdf file](http://www.itninja.com/static/090770319967727eb89b428d77dcac07.pdf) with common setup.exe command lines. – Stein Åsmul Aug 27 '14 at 06:28
  • Check my answer here : http://superuser.com/a/180980/47628 for tools that may work with some older non-MSI based IS setups. – B. Shea Jan 05 '17 at 01:48
13

http://www.compdigitec.com/labs/files/isxunpack.exe

Usage: isxunpack.exe yourinstallshield.exe

It will extract in the same folder.

Motomotes
  • 4,111
  • 1
  • 25
  • 24
  • 2
    That was the only program that worked for me in unpacking an ISv12 installer. This program reported a problem, but it extracted everything anyways. – gcode Nov 24 '12 at 02:52
  • Great tool, thanks for sharing - works fine for my current installer reversing whereas the hints mentioned by @MichaelUrman unfortunately did not. – Till Oct 28 '13 at 19:02
5

On Linux there is unshield, which worked well for me (even if the GUI includes custom deterrents like license key prompts). It is included in the repositories of all major distributions (arch, suse, debian- and fedora-based) and its source is available at https://github.com/twogood/unshield

stefanct
  • 2,503
  • 1
  • 28
  • 32
3

Start with:

setup.exe /?

And you should see a dialog popup with some options displayed.

Garen
  • 941
  • 2
  • 9
  • 20
0

The free and open-source program called cabextract will list and extract the contents of not just .cab-files, but Macrovision's archives too:

% cabextract /tmp/QLWREL.EXE
Extracting cabinet: /tmp/QLWREL.EXE
  extracting ikernel.dll
  extracting IsProBENT.tlb
  ....
  extracting IScript.dll
  extracting iKernel.rgs

All done, no errors.
Mikhail T.
  • 3,043
  • 3
  • 29
  • 46
  • 2
    cabextract will unpack anything that contains Microsoft cabinet files, but typically InstallShield does not, despite having files called "data1.cab". Instead, to unpack InstallShield "cab" files, use the [unshield](http://sourceforge.net/projects/synce/files/Unshield/0.6/) program that's part of the SynCE project. – Stuart Caie Mar 23 '15 at 09:50
  • 2
    SynCE seems to be abandoned these days, [unshield is now hosted at github](https://github.com/twogood/unshield) – Stuart Caie Mar 23 '15 at 10:04