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

41 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.|

  32. ergfir nolikz Says:

    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

  33. du lich truong huy Says:

    I’ve recently started a blog, the information you offer on this website has helped me greatly. Thanks for all of your time & work.

  34. scoot Airlines office Dhaka Says:

    I used to be suggested this blog by my cousin. I am now not sure whether or not this put up is written via him as no one else recognize such specified about my difficulty. You are amazing! Thanks!

  35. softwares Says:

    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..

  36. Tips Certification Says:

    I was looking through some of your blog posts on this site and I conceive this website is very instructive! Keep putting up.

  37. http://willy.gadingmurni.com/fresh-new-invention-ideas/ Says:

    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..

  38. www.lao88.co Says:

    You are my inhalation, I possess few blogs and sometimes run out from to post .

  39. https://penzu.com/p/9f8fcfc4 Says:

    Absolutely indited articles, appreciate it for entropy. “The bravest thing you can do when you are not brave is to profess courage and act accordingly.” by Corra Harris.

  40. responsive tasarım nedir Says:

    My brother recommended I may like this web site. He used to be totally right.
    This publish actually made my day. You can not consider just how a lot time I had spent for this info!
    Thank you!

  41. used car buyers melbourne Says:

    I got what you mean , thankyou for putting up.Woh I am happy sex find this porn through google. “Those who corrupt the public mind are just as evil as those who steal from the public.” by Theodor Wiesengrund Adorno.

Leave a Reply