1

I have an existing MSI package which I want to repackage to add installation options (so far the MSI has been installed through the command line with msiexec parameters in a .bat file).

Are there, as of today, freeware tools available to repackage the MSI? I was stumbling over WiX but as per my understanding I need VisualStudio to complete what I wanted (I dont have VisualStudio)?

Thank you!

Doncholio
  • 45
  • 8
  • 1
    What is the task: Repackage third party MSI for corporate deployment? Tweak a base, template MSI for your own product release? Please elaborate. The topics of [repackaging](http://www.installsite.org/pages/en/tt_corp.htm) and deployment are huge. [Throwing in some links](https://stackoverflow.com/a/54777375/129130). **Towards bottom**. – Stein Åsmul Feb 25 '19 at 16:54
  • A best practice for working with an existing MSI is to use transforms. A best freeware tool for working with MSI (including transforms creation) is InstEd. – montonero Feb 26 '19 at 08:44
  • Yes, repackage a third party MSI for deployment. I want to add the configurable msiexec parameters directly into the package if possible, rather than into a .bat file (or GPO): @msiexec /package InstallerFile.msi /lex logfile.log config="parameterA=1;parameterB=1" – Doncholio Mar 01 '19 at 18:15
  • You don't need Visual Studio to use WiX and they do have a utility called 'Dark' that will decompile a msi into WiX source code. That could help you get started if you wanted to go the WiX route. http://wixtoolset.org/documentation/manual/v3/overview/alltools.html – BryanJ Mar 06 '19 at 14:28

4 Answers4

0

What exactly do you want to add to the MSI package?
You could use Orca to modify any table in the MSI.

sevi
  • 460
  • 5
  • 20
  • Doncholio didn't exactly tell us what he wants to change. If he wants to set some properties or add some basic things like a Custom Action, Orca is more than enough. – sevi Feb 28 '19 at 10:18
  • I want to repackage a third party MSI for deployment. I want to add the configurable msiexec parameters directly into the package if possible, rather than into a .bat file (or GPO): @msiexec /package InstallerFile.msi /lex logfile.log config="parameterA=1;parameterB=1" – Doncholio Mar 01 '19 at 18:19
  • 1
    That would require to change the tables directly without using a transform. I wouldn't do that since if you're having problems with the installation or the software, vendors will most likely deny support. It also seems to make things more complicated for you. It's easier to just pass some values to public properties in the command line instead of opening the msi and do the changes there. – sevi Mar 07 '19 at 12:01
  • Thats my conclusion after reading the comments - thanks everyone. I basically wanted to modify the MSI to just having one file rather than passing commands. seems like that is not really a good idea and/or not really common. – Doncholio Mar 07 '19 at 20:38
0

It sounds like you want to create a 'response transform'. There's a free tool here: http://www.jontylovell.net/index.php?page=10

You would right-click on your MSI, click 'Create Transform', and select all the appropriate options during the install phase. It will then create an MST (saved in a location of your choice) with all your preselected options, of which you can then apply to the original MSI on the command line:

MSIEXEC /i [path to MSI] TRANSFORMS=[path to MST]
Captain_Planet
  • 1,228
  • 1
  • 12
  • 28
0

Transform: If all you want is to create a transform you can use Orca (much preferred), SuperOrca, InstEd, and possibly other tools described here:


Orca is Microsoft's own tool, it is installed with Visual Studio and the Windows SDK. Try searching for Orca-x86_en-us.msi - under Program Files (x86) and install the MSI if found.


Orca, Procedure: 1) Open your MSI, 2) Transform => New Transform, 3) Make changes to MSI as appropriate, 4) Transform => Generate Transform.

Similar approach in other tools.

Customizing MSIs: Here is an old answer on how to customize MSI installers (command lines / PUBLIC PROPERTIES, transforms, etc...): How to make better use of MSI files. Many further links from within that answer. It is an odd writeup that just happened, but the top section might help.


Sample transform application: To apply the transform during installation:

msiexec.exe /i myinstaller.msi TRANSFORMS="mytransform.mst;1031.mst" /L*V "msilog.log" /QN

Quick explanation:

/i = run install sequence
TRANSFORMS="mytransform.mst;1031.mst" = transform(s) to apply
/L*V "msilog.log"= verbose logging at specified path
/QN = run completely silently

Links:

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
0

It seems like what I wanted to achieve is not really a common thing to do, so I stick to passing the configuration through the command line. a separate file (transform) will not help in my case because the goal was, just to have one file - a fully configured MSI - thanks everyone for the help though!

Doncholio
  • 45
  • 8
  • I don't use this feature, but: [Embedded Transforms](https://learn.microsoft.com/en-us/windows/desktop/msi/embedded-transforms). [Embedding Customization Transforms as Substorage](https://learn.microsoft.com/en-us/windows/desktop/msi/embedding-customization-transforms-as-substorage). I believe you have to specify the transform on the command line to apply it. Not sure if you can set the TRANSFORMS property in the property table. On the command line you prefix an embedded transform with **`:`** on the command line. – Stein Åsmul Mar 07 '19 at 21:50
  • [Applying Transforms](https://learn.microsoft.com/en-us/windows/desktop/msi/applying-transforms). – Stein Åsmul Mar 07 '19 at 21:52
  • Should also mention that you can apply a transform to an MSI and create a new MSI from the "meld". For example using `Orca`. You apply a transform to an MSI and then you can go `File => Save Transformed As...` Maybe you already know this. – Stein Åsmul Mar 08 '19 at 01:04