Announcement

Collapse
No announcement yet.

How do I extract MSI from exe?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I extract MSI from exe?

    I am using a bootstrapper that combines an x64 MSI file and a Win32 MSI file into one executable.

    Is there a setting somewhere where I can extract the MSI files from the executable?

  • #2
    I'm using a custom bootstrapper, so I don't see the option "Allow MSI file extraction on command line" in the MSI Factory interface.

    Comment


    • #3
      I solved it. I have in the bootstrapper these entry IDs:

      mainscript (Source is mainscript.lua),
      _global_functions.lua (Source is Data\_global_functions.lua)
      x64setup (Source is setupx64.msi)
      Win32setup (Soruce is setupx86.msi)

      I then made a backup of "C:\Program Files (x86)\MSI Factory\Bootstrap\Data\_global_functions.lua" so I have the original file if needed.

      Then, I modified _global_functions.lua as follows:

      In the "function g_ExtractMSICommandArg()", I changed the line
      Code:
      local bExtracted = Archive.ExtractFile("mainsetup", strExtractPath);
      to
      Code:
      local bExtracted = Archive.ExtractFile("x64setup", strExtractPath);
      The 'x64setup' matches the Source in my custom bootstrapper xml file.

      Then, from the command line, it will now extract the setupx64.msi file by running this at the command line:
      Code:
      setup.exe /EXTRACTMSI:c:\temp\setupx64.msi
      Hope this helps someone if needed.

      Comment


      • #4
        BUT...it would be nice to be able to have two extraction options, so if the customer wanted either the x86 or x64 MSI file, they can choose.

        Comment


        • #5
          You can add support for any custom command line arguments, see the global variable: _CommandLineArgs
          You could add support for "/extract_x86" or "/extract_x64" or anything else by parsing the command line, and processing the argument if found...

          Ulrich

          Comment

          Working...
          X