1

I need to execute an installation of an msi file from the command line and be able to modify the options in this msi install file (check boxes, radio buttons... etc) from the command line.

I'm using superorca and msiexec to find the properties I would need to modify and to modify them. But since msiexec can only modify public properties I'm stuck since some of the options such as radio buttons and check boxes cannot be changed by just modifying the public properties.

Is there a way for me to modify those public properties from the command line?

Adilicious
  • 1,643
  • 4
  • 18
  • 22
  • 2
    You can do this with transforms. Open your MSI in the Orca application, modify it the way you need (e.g. change some properties), save a copy and generate a transform between the original package and the modified one. WiX has tools to do this. Later you can embed transforms into your original MSI package and apply the one you need during installation. – Yan Sklyarenko Nov 19 '13 at 12:27
  • Thanks for the help Yan. The reason this doesn't work for me is that I can't modify the installation package in any way other than through the command line since this package is going to users later. Basically I have the unmodified msi package that can only be modified through the command line. – Adilicious Nov 19 '13 at 14:49
  • 1
    Okay, then don't embed the transforms back to the package. You can apply the transforms from the command line as well – Yan Sklyarenko Nov 19 '13 at 15:40
  • Hey Yan I looked into transforms and it was exactly what I needed thanks for your help. – Adilicious Nov 22 '13 at 08:27
  • 2
    Great to know you solved your issue! – Yan Sklyarenko Nov 22 '13 at 09:03

2 Answers2

2

Using transforms as Yan suggested first, is one of the most powerful ways. With using the parameter (this is a kind of public property) "TRANSFORMS" like in:

msiexec /i "c:\myinstall.msi" /qb TRANSFORMS="c:\mytran1.mst" 

you can modify the original MSI like you want. Using properties is restricted. Private properties (that's whey they are called 'private') can normally not be changed from command line (They could be changed if there are custom actions prepared in the MSI on which the private ones depend, but that's not the way to go). Dialog boxes are not always designed to be controlled by properties from the command line. Of course you can edit a transform, so that you favorite dialog settings belong to special newly defined public properties you like, and use them already in the same command line !

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
Philm
  • 3,448
  • 1
  • 29
  • 28
  • Hey Philm sorry it took so long for me to answer on here but I've been having network problems and did not have access. Thanks so much for your help, I'll look into transformers to see if that's a better solution for what I need to do. – Adilicious Nov 21 '13 at 14:22
  • Hey Philm like I told Yan I looked into transforms and it was exactly what I needed thanks for all your help. – Adilicious Nov 22 '13 at 08:28
  • [**More on PUBLIC properties versus Transforms**](https://stackoverflow.com/a/1055861/129130). – Stein Åsmul Aug 22 '18 at 05:11
0

One way that I've found to do this is to use Database Queries Using SQL and Script to modify the msi file to suite my needs and then execute it from the command line.

Information on how to do this can be found here

Also this is an issue I encountered and the solution for it.

Adilicious
  • 1,643
  • 4
  • 18
  • 22
  • 1
    Script changes are superior if you want to change not only one MSI but several different MSIs and you need a real programming language to have more logic than with a fixed SQL command. – Philm Nov 20 '13 at 14:16
  • 1
    I just think you have not really looked what a MSI transform is. A transform just contains SQL statements too. One advantage is, that you have a standard GUI to create, compare, view transforms with Orca and similar tools. Another is, that transforms are a very standard way. With the MS standard MSI SDK tool msitran.exe you can also change a MSI file on-the-fly _before_ you install like with a script. Applying a change _during_ installation is a feature which is reserved to transforms only! – Philm Nov 20 '13 at 14:23