Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm try to run msiexec in PowerShell but I keep getting an error message. If I run it from cmd then it's all fine.

Can someone please let me know how I can run this command in PowerShell?

This is the command I have typed in PowerShell:

msiexec.exe /qb /I "C:\m_temp\Floating\PrimeWixInstaller.msi" INSTALLLOCATION="C:\Program Files\Mathcad\Mathcad Prime 1.0" ALT_DOC_DIR="C:\Program Files\Mathcad\Mathcad Prime 1.0"

When I try to run the command then the Windows Installer help window pops up:

Windows Installer help window

share|improve this question
up vote 5 down vote accepted

It happens because the arguments contain spaces (for example, "C:\Program Files\Mathcad\Mathcad Prime 1.0"). In such cases you must escape the quotes around the arguments.

The escape character in PowerShell is the grave-accent(`).

So the command should look something like this:

msiexec.exe /qb /I "C:\myInstaller.msi" INSTALLLOCATION=`"C:\Program Files\installFolder`" ALT_DOC_DIR=`"C:\Program Files\otherFolder`"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.