header image ≡ Menu

Command Line Switches for MSI and MSP Installations

thumbHi Folks, Its time for yet another Guest Post; and we have Bhuvana writing for us. In this article she focuses on the command line arguments and the silent switches that can be used for msi and msp (un-installable patches). Bhuvana specializes in InstallShield & MSI Installers and her primary responsibility at work is “Build & Release” which includes creating Setups and Source Control Management.

She keeps all the details crisp in this table. I know that, this below chart will be as a printed one.. in your desks !!

Install / Uninstall Command Line Option Silent Mode
MSI – Installation  msiexec /i “<msi file name with path>” [TRANSFORMS="<mst file name with path>"]  msiexec /i “<msi file name with path>” [TRANSFORMS="<mst file name with path>"] /qn
MSI – UnInstallation  msiexec /x <ProductGUID> msiexec /x <ProductGUID> /qn
MSP – Installation Command line with Progress dialog:
msiexec /p “<msp file name with path>” /qb
msiexec /p “<msp file name with path>” /qn
Command line with UI:
msiexec /p “<msp file name with path>” REINSTALLMODE=oums REINSTALL=ALL
MSP – Uninstallation Command line with Progress dialog:
Msiexec /package <ProductGUID> MSIPATCHREMOVE=<PatchGUID> /qb
msiexec  /I <ProductGUID> MSIPATCHREMOVE=<PatchGUID> /qn
Note:

  1. Patch uninstallation does not work without /qb option. i.e. Patch can be uninstalled from command line only in silent mode. If you want to invoke the UI for uninstallation, go to Add / Remove Programs with Show Updates enabled.
  2. Msiexec /uninstall <PatchGUID> /package <ProductGUID> /passive
    The above command removes the entire base product but not the Patch alone.

Bhuvana’s Thought on Msigeek.com:
I came across MSIgeek blog through linkedin groups. Good to see lots of articles and FAQs on MSI at one stop. Some of the articles definitely helps to give a better insight into the concepts. So felt like contributing some article, which would help people like us, the Packaging specialists.

If you want to get in touch, her LinkedIn Profile is - Here. (PS: Do mention in the LinkedIn request that, you read her article on msigeek. We do not want to give her un-necessary Spams :-) )

Comments on this entry are closed.

  • Vivek

    Good article,

    Small doubt, any idea Why Ptach uninstallation doesnot work without “/qb” option?

    Thanks Bhuvana for this article in MSIGeek, I am also a fan of MSIGeek.

    VJ,

    Thanking you :) If any plan posting article on creating TRANSORMS? will help much profs like me to learn basics of packaing

  • http://www.thewindowsclub.com/ AnandK

    Nice article, sure will be of use to Admins.

  • Sachin J

    Good one.I attached this printout on my desk.

  • Bhuvana

    Hi Vivek

    Thanks for your feed back.
    If you enter the command 'Msiexec /package <ProductGUID> MSIPATCHREMOVE=<PatchGUID>' without /qb option, it displays the maintenance dialog.

    Regards
    Bhuvana

  • anilm2010

    Awesome post Bhuvana :-)

  • rishumehra

    Very gud.. its quite informative..

  • shanthi

    very useful and informative article.

  • Bhuvana

    I am glad that it was useful

  • rodolfuuu

    Great Post Vj, an aditional comment, you can set to install more than one msp file in the same command line, with ; between the msp filename. Example: msiexec /p “name1.msp”;”name2.msp” /qn

  • msigeek

    Thanks for your addition buddy.! Well, Bhuvana gets the credit for this nice post (not me) he he..!!

  • msigeek

    Thanks for supporting the blog Vivek. Your idea is really soooper cool. We will write an article on MST (Transforms) and post it soon.

  • suchikant

    very useful article

  • Vivek

    @ Bhuvana,

    Thanks a lot on clarifying the doubt

    @ VJ,

    Great VJ, learning abcd of Packaging now. This blog alwayz a handbook for me. Your tech updates and Winodows 7 articles are sooper :)

  • Pinaki M

    Very useful article …

  • http://www.paydaytown.com/ payday loans

    I want to thank the blogger very much not only for this post but also for his all previous efforts. I found http://www.msigeek.com to be greatly interesting. I will be coming back to http://www.msigeek.com for more information.

  • http://www.evontech.com Nitin

    Hi Bhuvana,
    Thanks for this valuable post. I would like to know installing patch (.msp) of my .net application works fine on XP professional using ‘msiexec’ command with ‘/qn’ option for silent install however it does not get installed on Windows7 Home basic. I guess there might of its security issues but I dont know how to fire msiexec command so that it is forcely installed.

    • Vijay

      Hey Nitin, . If its running with a \qn, the UI dialog of the msi doesn’t appear and even the UAC consent is not answered. Hence, the software doesn’t install. If you use a /qb, it may throw the UAC dialog.

      This link gives some information on this – http://www.symantec.com/connect/forums/you-do-not-have-sufficient-privileges-complete-installation-all-users. According to this one mitigation is to set a GPO policy and also rename the installer name to something like setup.msi or install.msi.

      However, if you are pushing through SCCM or any deployment agent, it shouldn’t cause an issue. It will just install.

      • http://www.evontech.com Nitin

        Hi Vijay,
        Thanks for your reply. I have not found any solution yet.

        Problem:
        msiexec.exe /update “myPatch.msp”/qn

        above works for XP but not on Windows7

        How can I fire this command in Windows7. I have logged in as User who has admin privileges.

        Nitin

        • Vijay

          Well Nitin, try this -

          Goto Start-> cmd-> right click and do a Run as Administrator. Now the cmd window will run in admin context (hint – this will open with the path C:\System32 in it.)

          Here run the previous command. ie., msiexec /update “mypath.msp” /qn

          This will work. Do test and let me know!

        • http://www.evontech.com Nitin

          when I remove ‘/qn’ and hit enter it opens a dialog box, where I click ok, Then It runs fine on Wsindows7 too.
          But I want it silent… :(

          • Vijay

            Do add the /qn and run the ‘cmd’ window in admin context (right click and run as administrator). This will work.!

  • Konar

    Excellent !!!!!!!!!! work

    • Vijay

      Thanks Konar, the credit goes to Bhuvana for this post!

  • Pingback: Webinar: Best Practices for Building Installation in Visual Studio 2010

Google+