3

An particular vendor's MSI is usually installed via an EXE wrapper, but I'm trying to deploy using silent installation via GPO. I am struggling to pre-set the SecureCustomProperties.

The vendor documents UPPERCASE command-line options that can be passed to the EXE wrapper, which I assume passes them on to the MSI. Using Orca, I can see that the MSI's Property table contains SecureCustomProperties. This key's value is a semicolon-delimited, UPPERCASE list of all the documented parameters.

However, each individual parameter does not have a corresponding key in Properties. How can I pre-set these?

According to How to make better use of MSI files

You can find most properties listed in the MSI file's Property table, but it is also possible that some properties can be set that are not defined in the Property table. In most cases this relates to properties being set only from the setup GUI (indicates a setup design error in most cases). All properties should be defined in the property table in a properly authored package.

Can I just add each parameter as a key in Properties and add my custom value? If so, should I leave the parameters in SecureCustomProperties?

Example:

SecureCustomProperties: BLAH1;BLAH2;DBHEADER;BLAH4

DBHEADER is not a key in Properties. How do I set the value of DBHEADER?

2 Answers 2

4

Short Version: This is a version you can try first.

  1. Run the this from a command prompt (kicks off administrative installation - maybe):

     setup.exe /a
    
  2. Extract to a location of your choice - if possible (more on extraction below).

  3. Grab the MSI and open it with Orca and generate a transform as described below - setting the SecureCustomProperties in the Property table

  4. Try to install silently using either the setup.exe or via msiexec.exe if you run the MSI on its own (pick one of the below command lines):

     setup.exe /s /v"TRANSFORMS=\"C:\Transforms\1.mst\""
    
     setup.exe /s /f1”c:\temp\my-answer-file.iss” /v"C:\Transforms\1.mst"
    
     msiexec.exe /I "C:\Your.msi" /QN /L*V "C:\msilog.log" TRANSFORMS="C:\My.mst"
    

In point 4 the command lines are for Basic MSI, Installscript MSI and vanilla, extracted MSI respectively. For Installscript MSI a response file is needed. It might be found in the extract, or else it must be generated. See below.


Transform: I would use a transform. Transforms can change "anything" in an MSI, and hence it can easily set SecureCustomProperties as well. Essentially that property is a security measure (limiting what properties can be passed to the elevated installation process from the GUI sequence), and hence I guess they do not want it to be possible to set via the command line (my assumption).

Setup.exe vs MSI: You can try to deploy the setup.exe directly with a silent installation command, or you can try to extract the embedded MSI file along with its prerequisites from the setup.exe and deploy them separately. Very often the prerequisites are not needed to deploy - for example the .NET framework. An extracted MSI is also much easier to deal with since it supports standardized command lines, let me show a quick sample:

msiexec.exe /I "C:\Your.msi" /QN /L*V "C:\msilog.log" TRANSFORMS="C:\1031.mst;C:\My.mst"

Quick Parameter Explanation:

/I = run install sequence
/QN = run completely silently
/L*V "C:\msilog.log" = verbose logging
TRANSFORMS="C:\1031.mst;C:\My.mst" = Apply transforms 1031.mst and My.mst (see below).

File Extraction: Unfortunately a setup.exe can be lots of things ranging from legacy installers, to Installscript MSI to Basic MSI (both from Installshield) and various other possibilities exists from other vendors. They can even be Installshield Suite projects - which feature a totally different command line again. These are installers that can install any number of EXE and MSI files in sequence. I wrote up a similar answer the other day on the topic of how to extract files AND / OR installing silently: Create MSI from extracted setup files - please skim that answer. It focuses on extracing files, but also describes silent installation using the setup.exe.

Before trying anything else, try this:

 setup.exe /a

See if you get a prompt to specify an output location. If you do, extract the files. You will need to extract the files to get hold of the MSI file in order to create the transform.


Suggestions: As stated you can extract the setup.exe or try to run it silently. I prefer extraction, but let me suggest some possible command lines for silent install via setup.exe. I don't know the details of your setup.exe, but let me just make a few guesses:

Basic MSI:

setup.exe /s /v"TRANSFORMS=\"C:\Transforms\1.mst\""

Installscript MSI:

  • Step 1: Record response file:

      setup.exe /r /f1"c:\temp\my-answer-file.iss"
    
  • Step 2: Basic silent install (using the response file) & applying a transform:

      setup.exe /s /f1"c:\temp\my-answer-file.iss" /v"C:\Transforms\1.mst"
    

Creating Transform: You can create a transform in Orca, or any other MSI deployment tool. Free Tools. Main Tools (free and commercial). In Orca you open an MSI, and then go Transforms => New Transform. You then change what you need to change - in your case the Property table and SecureCustomProperties. When you are ready: Transforms => Generate Transform... Now save the transform.


Installshield Help File:

There are several relevant sections in the Installshield help file. Please study these if you need more tweaking of the installation parameters. All switches are documented here - these links are for the 2018 edition of Installshield:

2
  • Thanks; your answer provided a lot of useful background and solved some other problems I was having, but it didn't help me with the specific problem of properties missing rows in Property.
    – bendodge
    Aug 27, 2018 at 14:07
  • As implied in the answer this is done using Orca to add or change rows in the MSI and saving as a transform. Aug 27, 2018 at 14:35
0

By trial and error, I found that using Orca to add the missing keys to the Property table worked.

Example:

SecureCustomProperties: BLAH1;BLAH2;DBHEADER;BLAH4

DBHEADER does not exist as a key (row) in Property, so we can't set it.

Solution:

Add key DBHEADER with my desired value (Live) to Property table.

Adding row with Orca

Resulting new row added

Then generate and use the resulting MSI Transform as described elsewhere.

4
  • Yes, I guess I should have spelled this out. Tip: If you have an "application packaging" team in your company, they might be able to help you with these practical details as they pop up while you work. Most large companies have such a team, but it might be offshore. Aug 27, 2018 at 15:11
  • We're a relatively small college with a 7-person IT dept. So we have to figure it out ourselves. :-)
    – bendodge
    Aug 27, 2018 at 17:58
  • Is fact that some command-line parameters are mentioned in SecureCustomProperties irrelevant? Some parameters are documented, are not in SecureCustomProperties, and can be set by adding a row to Property.
    – bendodge
    Aug 27, 2018 at 18:00
  • 1
    Generally anything you need to set via command line must be present in the SecureCustomProperties list, but it may not need to be explicitly defined in the property table actually. Aug 27, 2018 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.