Windows Installer InstallAware for Windows Installer Header Image Windows Installer without Rocket Science

  InstallAware Blog

   

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

31 Responses to “Extending MSI command line switches”

  1. Dana Epp Says:

    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. Software Package Guy Says:

    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. Dan G Says:

    I agree wholeheartedly with Software Package Guy. Standardized command parameters are indeed important and useful.

  4. Another Package Guy Says:

    Dan G is right about Software Package Guy being right.

    I’ve automated hundreds of apps for silent install over the years and these custom-bootstrap ones are always a pain. Feel free to make a custom installer, but if you’re going to make an MSI, stick to standards… otherwise you’re just kludging it up!

  5. John Byerly Says:

    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.

  6. Tasha Reign Says:

    I can get you off in 10 minutes if you’re willing to pay $100 per minute :)

  7. webmaster Says:

    Harika paylaşım devamını beklerim

  8. istanbul web tasarım Says:

    Teşekkürler faydalı bir içerik paylaşmışsın

  9. seo Says:

    Sitenizi çok beğendim konularınızın devamını beklerim teşekkürler

  10. kurumsal web tasarım Says:

    Yazıyı beğendim çok teşekkürler

  11. seo hizmeti Says:

    Sitenizi çok beğendim konularınızın devamını beklerim teşekkürler

  12. istanbul web yazılım Says:

    Sayfanızı çok beğendim konularınızın devamını beklerim kolay gelsin

  13. istanbul web yazılım Says:

    Konuyu beğendim çok teşekkür ederim

  14. seo Says:

    Merhabalar google da gezinirken yazınız gözüme çarptı çok beğendim teşekkür ederim.

  15. php yazılım Says:

    Merhabalar nette gezinirken konunuz gözüme çarptı çok beğendim teşekkür ederim.

  16. doğru web Says:

    Araştırdığım bir çok konuda sitenizi buluyorum teşekkür ederim

  17. kurusal site Says:

    Uzun süredir aradığım bilgiydi teşekkürlerimi sunarım

  18. web tasarımı Says:

    Güzel bir makale çok teşekkür ederim

  19. doğru web Says:

    Google’da arama yaparken sitenizi buldum siteniz ilgimi çekti çok teşekkür ederim

  20. web tasarım ofisi Says:

    İyi bir içerik teşekkür ederim

  21. jobs that travel the world without a degree Says:

    Wow, amazing weblog format! How lengthy have you
    been running a blog for? you made running a blog look easy.
    The total look of your site is great, let alone the content!

  22. Homme Nike Dunk 6.0 Says:

    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.

  23. adidas nmd online sale Says:

    You really make it appear really easy along with your presentation however I to find
    this matter to be really something that I believe I might by no means understand.
    It sort of feels too complicated and very large for me.
    I’m looking forward for your next submit, I will attempt to get the grasp of it!

  24. nba 2k16 my xbox one Says:

    {

  25. como abrir uma empresa em 3 dias Says:

    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.

  26. nba 2k16 mt cheats Says:

    Many thanks, this site is very useful.|

  27. Ray Ban RB3025 Says:

    Valuable info. Lucky me I found your website unintentionally, and I’m surprised why this
    twist of fate did not happened earlier! I bookmarked it.

  28. negocio online de sucesso Bruno Pinheiro Says:

    Faça uma sátira construtiva tanto quanto em direção a você, uma
    vez que líder e zelador, no que se refere à lhe negócio.

  29. csgo skins condition Says:

    You can Learn How To Redeem this NBA 2K16 DLC Game Code On Xbox And PlayStation – Just Download The Full PDF Guide under.

  30. Felix Yoon Says:

    Definitely, what a great site and illuminating posts, I will bookmark your site.Best Regards!

  31. Terrell Nawrocki Says:

    Great looking site. Think you did a great deal of your very own coding.|

Leave a Reply