igbgotiz
igbgotiz

Reputation: 942

msiexec doesn't install msi

I want to install "foo.msi" from cmd command line. I run:

msiexec.exe /qn /i .\foo.msi

It returns almost instantaneously and foo.msi does not get installed. I'm not sure what I'm doing wrong.

To root out the causes of error, I ran:

msiexec.exe /qn /i .\doesNotExist.msi

And got the thing. It returns immediately. No complaints about not being able to find the .msi or anything.

Does anyone know the proper way to use msiexec.exe to install an msi from windows cmd command line?

Upvotes: 4

Views: 8011

Answers (2)

Sumit Gupta
Sumit Gupta

Reputation: 785

In this case, the first step to run your command with the logs option as below:

msiexec -i "foo.msi" /qn /L* "d:\logs\log.log"

Check the logs for errors. When I faced this, the issue was missing property values. That can be pass like below:

msiexec.exe /i "foo.msi" MYPROP1="myValue1" MYPROP3="myValue2"

Upvotes: 1

yossiz74
yossiz74

Reputation: 929

msiexec runs asynchronously. If you want to wait for it to complete its work, use:

start /wait msiexec /qn /i .\foo.msi

Upvotes: 5

Related Questions