I want to use this msiexec command in my NSIS script to install a MSI package quietly.

Exec '"msiExec" /qn /package "$INSTDIR\mypackage.msi"  INSTALLDIR="$destinationDir"'

But it still showing the command prompt for a split second.
I also tried the parameter /quiet but there was no difference.

Is there an other way to install the MSI package "full" quietly?

有帮助吗?

解决方案 2

Exec '"msiExec"' does not show a console on my system.

Could it be a custom action in the msi? If you monitor the system with Process Monitor and use Ctrl+T you should be able to see who the parent of conhost.exe is on Windows7+

其他提示

Sounds like there is an error in the command line. I am unfamiliar with NSIS though. A normal quiet mode MSI install command is:

msiexec.exe /I "C:\TestInstall.msi" /QN

Try to run the tool in this thread to help you deal with the MSI command line complexity: How to interactive a silently installing msi? (Progress data and cancel it) . It is a very effective tool called "Windows Installer Command Line Builder" from Wise Solutions. You can use it to experiment with the command line until it runs the way you want it to.

An msiexec.exe command line can become extremely complicated when you want to apply multiple transforms, set multiple properties and enable logging. Here is a sample:

msiexec.exe /I "C:\Installer.msi" /QN /L* "C:\logs\msilog.log" ALLUSERS=1 TRANSFORMS="C:\Transform.mst;C:\1031.mst"
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top