7

I have been trying to install a msi file using cmd. The command looks like C:\Windows\system32>msiexec.exe -q -i "Installer.msi"

But every time I run this the window for help options is opened for msi instead of running the installer. What could be the problem?

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
Siddhant
  • 571
  • 1
  • 8
  • 32

2 Answers2

1

I think msiexec.exe /i installer.msi /qn should work.

See here for a similar thread on serverfault: https://serverfault.com/questions/30068/silent-install-of-msi/67001#67001

To deal with the complicated msiexec.exe command line interface, try this free tool from Installation tool developer Altiris: http://www2.wise.com/filelib/WICLB.exe - broken link resurrected from Wayback machine. Seeing as the tool was freeware I assume that is legal.

Please run the download by virustotal.com for safety.

Here is a screenshot:

enter image description here

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • /qn is not working. Don't know why its opening the help window everytime..i'll try this tool though.. – Siddhant Mar 04 '14 at 08:39
  • How can I check if the installation is taking place in silent mode? – Siddhant Mar 04 '14 at 08:42
  • Download the tool and try it. There may be an issue with the whole msi file, or the paths could be wrong. Try the GUI. – Stein Åsmul Mar 04 '14 at 08:44
  • it's working when I don't run in the silent mode now using this GUI. But I need to run this in silent mode. Is there a way to check if its running in silent mode or not? – Siddhant Mar 04 '14 at 08:50
  • In GUI mode it is running fine – Siddhant Mar 04 '14 at 08:59
  • Silent install is built into the MSI design. If it is not working with this MSI, the file must be seriously flawed by design or its creator has disabled silent mode via a custom action intentionally. Does this install ask for a lot of user input? – Stein Åsmul Mar 04 '14 at 08:59
  • Yes I have various properties. I tried with QB mode. specified the properties and its works perfectly. I think that should be fine for me. – Siddhant Mar 04 '14 at 09:13
  • OK, welcome to the community. Please remember to upvote and accept helpful answers and comments. Is this your own MSI? It sounds like it is not 100% standards compliant. – Stein Åsmul Mar 04 '14 at 09:42
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/48941/discussion-between-glytzhkof-and-siddhant) – Stein Åsmul Mar 04 '14 at 09:43
  • Your first sentence is wrong. You forgot the /i for install. – BryanJ Mar 05 '14 at 19:27
  • 1
    Download link is broken. – William Melani Jan 14 '15 at 21:12
  • Found it on Cnet by searching "Windows Installer Command Line Builder" – William Melani Jan 14 '15 at 21:19
  • Hi William, just checked CNet, couldn't find the link? I will check back later, might have missed something. This tool is too useful to disappear. – Stein Åsmul Jan 16 '15 at 15:20
1

First, you need to specify the full path to the MSI file. Also, the command line is really picky if you are specifying anything else, and sometimes it doesn't like spaces between value=proprtyname. Those errors will give you the help screen because you got the syntax wrong in some way.

Note that the MSI file will not install successfully in silent mode if it requires elevation. It won't ask for the elevation prompt if you are in silent mode. That means you should try the command line install from an elevated prompt.

PhilDW
  • 20,260
  • 1
  • 18
  • 28
  • Firstly, my cmd is running in elevated mode. Secondly, when I run installer in full UI mode from elevated cmd with properties mentioned, it is a success. So, I guess my properties are correct. Thirdly, when I run the same with same set of properties in silent mode it fails. Fourthly, my installer requires to be run in admin mode. Manually when I run it, I have to right click and select run as admin – Siddhant Mar 06 '14 at 04:55
  • Fifth, the error that I get when I run my installer manually in normal mode is the same as that I get when I run the installer in silent mode using elevated cmd. So, that makes me think, it's not getting elevated in silent mode but it does get elevated in full UI mode – Siddhant Mar 06 '14 at 05:01
  • The installer is to install some db's on my system. So, everything that I am doing is on my own system. And the password and username to log in to my sql server is also correct – Siddhant Mar 06 '14 at 05:02
  • Sorry, I don't understand. If the issue is that you see the msiexec help dialog when you use your msiexec command, then by definition the command line is incorrect in some way, and the install isn't even starting. The problem is an incorrect msiexec command line, such as not specifying the full path to the MSI file or otherwise getting it wrong. It's got nothing to do with whether your PROPERTIES are correct, it's to do with getting the syntax of the msiexec command right. My comment note about elevation was just a note, not an answer to the issue. – PhilDW Mar 06 '14 at 19:14
  • no, actually that issue was resolved. It was the incorrect command line..Now, I am facing the problem that I mentioned above. Sorry, for inconvenience. I have been stuck with this issue for 2 days now. – Siddhant Mar 07 '14 at 04:57
  • If you're extending this issue to include new problems then things can get confusing. It may be better to start fresh with a new issue together with the relevant information. – PhilDW Mar 07 '14 at 18:59
  • Thank you so much :D :D :D :D we were stuck in this for a long time until we saw this post here :) – srajappa Jan 10 '17 at 20:31
  • any solution for this ? – Vaibhav Jain Aug 30 '17 at 07:16