Extending MSI command line switches

Hi there! Today I’m going to show you how to extend your InstallAware setup packages to support custom command line switches. A frequent question we get is “why don’t standard MSI command line switches work?” The answer is really simple – InstallAware has its own bootstrapper and the command line parameters it accepts are well documented under the help topic “Setup Command Line Parameters“. In a nutshell, /s makes setup run silently, /l=<full path to log file> turns on logging, and you can pass variable values using the form “TARGETDIR=<path value>” (including the quotes, if you are specifying values with spaces in them).

Now that we’ve gotten the basics out of the way, let’s talk about how to extend this behavior. For instance, you  might have some real difficult customers who have this irrational insistence on sticking to standard MSI command line parameters. Or, more legitimately, you might be wanting to define your own custom command line parameters to do whatever you feel like doing with.

The $CMDLINE$ pre-defined script variable contains the exact command line passed to your installer. You can investigate what this variable contains using the If script command together with the Contains expression. This will make it very easy for you to test for the presence of custom command line switches. For instance, take a look at the following code snippet:

if Variable CMDLINE Contains /quiet
Set Variable SILENT to TRUE
end

This snippet uses the pre-defined script variable $SILENT$ to turn on silent installation mode when /quiet, a standard MSI command line parameter, has been passed to your installer. Easy enough!

For more complex evaluations, you can assign the $CMDLINE$ pre-defined script variable to a custom variable and then use the Parse String command to extract exactly whatever you need without destroying the contents of the original command line variable.

Talk to you soon!

Michael Nesmith
your friendly support engineer

49 Replies to “Extending MSI command line switches”

  1. Hey Michael,

    We use the cmd line options in InstallAware for silent mode installs. However, we now want to support this to be pushed in Active Directory Software Distribution policies, using assignment to computers, and we can’t provide cmd line switches to the MSI directly in AD.

    Do you have any recommendations on what to do?

  2. Your line, “you might have some real difficult customers who have this irrational insistence on sticking to standard MSI command line parameters”, is completely ridiculous. Standardized command parameters are really important and useful.

  3. The naming of $CMDLINE$ is misleading. It is NOT the command line, it is the arguments. The command line would include the path to the installer file. It so happens, that is the piece of information I am trying to obtain.

  4. Hi there I am so thrilled I found your blog page, I really
    found you by accident, while I was researching on Aol for something else,
    Nonetheless I am here now and would just like to say thanks a lot for a remarkable post and a all round enjoyable
    blog (I also love the theme/design), I don’t have time
    to browse it all at the minute but I have bookmarked it
    and also added in your RSS feeds, so when I have
    time I will be back to read a lot more, Please do keep up
    the fantastic work.

  5. Mercado livre lançou proximamente Mercado Shops, instrumento gratuitya integrada ao Mercado Pago que possibilita encqvalgar uma
    página com e também-commerce com identidade visual e domínio próprios, controle de vendas, cadastro desde compradores e outras facilidades
    administrativas.

  6. Undeniably believe that that you stated. Your favorite reason seemed to be at the web the simplest factor to have in mind of. I say to you, I definitely get irked at the same time as people think about worries that they just don’t know about. You controlled to hit the nail upon the top and also outlined out the entire thing with no need side effect , other folks could take a signal. Will likely be back to get more. Thanks

  7. Great V I should definitely pronounce, impressed with your website. I had no trouble navigating through all the tabs and related info ended up being truly easy to do to access. I recently found what I hoped for before you know it at all. Quite unusual. Is likely to appreciate it for those who add forums or anything, website theme . a tones way for your client to communicate. Nice task..

  8. Good ?V I should definitely pronounce, impressed with your web site. I had no trouble navigating through all tabs and related info ended up being truly simple to do to access. I recently found what I hoped for before you know it at all. Quite unusual. Is likely to appreciate it for those who add forums or something, site theme . a tones way for your client to communicate. Excellent task..

  9. Thank you a bunch for sharing this with all folks you actually realize what you’re talking about!
    Bookmarked. Please also visit my website =). We
    could have a hyperlink change agreement among us

  10. Their affiliate partners make money, too. They provide commissions for any sale that stemmed on their affiliate partner’s website. Once they have securely delivered the product, they impart a percentage of its sale to affiliate partners. The commissions they provide to affiliate partners differ from 2 to 75, depending upon the affiliate-marketing program they have registered with.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.