-1

We have a program that has an MSI to install it. Is it possible to pass in parameters from the command line and have them populate the fields that need to be completed by the user?

Currently we have an MSI that asks for certain data and has to be filled in manually. We are now trying to automate much of this from the command line. We've found the internal field names (keys) and we can pass these from the command line, however, the log shows that the values get deleted halfway through and they end up blank. I suspect that the fields aren't being populated with the passed in data, the fields end up blank, and the data gets erased. Only the directory in which to install the program doesn't get deleted.

enter image description here

I've found the fields in Visual Studio (right click the Setup project > View > User Interface) but it looks like the values only take static data. Is there any way to get them to take parameters from the command line?

CJ Dennis
  • 4,226
  • 2
  • 40
  • 69
  • Only have time for some links right now: [Customizing an MSI](https://stackoverflow.com/a/58232330/129130). [Customizing an MSI - in detail](https://stackoverflow.com/a/1055861/129130). Essentially only uppercase properties can be set on command line and passed to deferred execution (actual installation). There are numerous complexities, especially when dealing with dialogs. Only property values put there by the setup can be set via the command line - obviously - barring some built in properties: REINSTALLMODE, REINSTALL, ALLUSERS, etc... – Stein Åsmul Feb 10 '20 at 02:33

1 Answers1

0

Have a look to WiX condition properties passed from command line don't work?

The Property needs to be in UPPERCASE letters, like <Property Id="INSTALLSTARTMENUSHORTCUT" Value="0"/>

Then use MSIEXEC, like msiexec /i MySetup.msi INSTALLSTARTUPSHORTCUT=0 to set the properties from command line

KargWare
  • 1,746
  • 3
  • 22
  • 35
  • I guess I could have been clearer, but we are passing in CAPITALISED parameters, which do get shown in the log, then deleted and blank values used. I suspect the deletion occurs when there are form fields in the installer. They don't seem to get populated from the command line except the destination directory. – CJ Dennis Feb 20 '20 at 21:34