Extract MSI from EXE

前端 未结 8 1311
走了就别回头了
走了就别回头了 2020-11-22 04:16

I want to extract the MSI of an EXE setup to publish over a network.

For example, using Universal Extractor, but it doesn\'t work for Java Runtime Environment.

相关标签:
8条回答
  • 2020-11-22 04:20

    7-Zip should do the trick.

    With it, you can extract all the files inside the EXE (thus, also an MSI file).

    Although you can do it with 7-Zip, the better way is the administrative installation as pointed out by Stein Åsmul.

    0 讨论(0)
  • 2020-11-22 04:27

    I'm guessing this question was mainly about InstallShield given the tags, but in case anyone comes here with the same problem for WiX-based packages (and possibly others), just call the installer with /extract, like so:

    C:\> installer.exe /extract
    

    That'll place the MSI in the folder alongside the installer.

    0 讨论(0)
  • 2020-11-22 04:32

    For InstallShield MSI based projects I have found the following to work:

    setup.exe /s /x /b"C:\FolderInWhichMSIWillBeExtracted" /v"/qn"
    

    This command will lead to an extracted MSI in a directory you can freely specify and a silently failed uninstall of the product.

    The command line basically tells the setup.exe to attempt to uninstall the product (/x) and do so silently (/s). While doing that it should extract the MSI to a specific location (/b).

    The /v command passes arguments to Windows Installer, in this case the /qn argument. The /qn argument disables any GUI output of the installer.

    0 讨论(0)
  • 2020-11-22 04:32

    Launch the installer, but don't press the Install > button. Then

    cd "%AppData%\..\LocalLow\Sun\Java"
    

    and find your MSI file in one of sub-directories (e.g., jre1.7.0_25).

    Note that Data1.cab from that sub-directory will be required as well.

    0 讨论(0)
  • 2020-11-22 04:36

    The only way to do that is running the exe and collect the MSI. The thing you must take care of is that if you are tranforming the MSI using MST they might get lost.

    I use this batch commandline:

    SET TMP=c:\msipath
    
    MD "%TMP%"
    
    SET TEMP=%TMP%
    
    start /d "c:\install" install.exe /L1033
    
    PING 1.1.1.1 -n 1 -w 10000 >NUL
    
    for /R "%TMP%" %%f in (*.msi) do copy "%%f" "%TMP%"
    
    taskkill /F /IM msiexec.exe /T
    
    0 讨论(0)
  • There is no need to use any tool !! We can follow the simple way.

    I do not know which tool built your self-extracting Setup program and so, I will have to provide a general response.

    Most programs of this nature extract the package file (.msi) into the TEMP directory. This behavior is the default behavior of InstallShield Developer.

    Without additional information, I would recommend that you simply launch the setup and once the first MSI dialog is displayed, you can examine your TEMP directory for a newly created sub-directory or MSI file. Before cancelling/stopping an installer just copy that MSI file from TEMP folder. After that you can cancel the installation.

    0 讨论(0)
提交回复
热议问题