1

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?

Joe
  • 73
  • 1
  • 7
  • MSIExec is a GUI app so I'm not really sure where this console comes from. You might want to use ExecWait and full paths... – Anders Apr 02 '14 at 19:49

2 Answers2

2

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"
Community
  • 1
  • 1
Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • I think the command line isn't the problem because it is doing what i expect when i run it without the "/qn" parameter. – Joe Apr 02 '14 at 13:21
  • When you say it's showing the command prompt for a split second what exactly do you see? I've never seen that, and I'm wondering if it's something to do with the NSIS script. If you see a command window from a cmd type of command, then it's not msiexec, it's NSIS using something like a command line prompt to run msiexec. – PhilDW Apr 02 '14 at 17:11
  • @PhilDW: Exec/ExecWait is a thin wrapper around CreateProcess, the console exec stuff like nsExec are plugins... – Anders Apr 02 '14 at 19:51
  • @PhilDW: It looks like the window of the normal cmd.exe but no text in it.Or it's just too fast, to see the text. It isn't a big issue but i was wondering if i messed up something with the "/quiet" parameter. – Joe Apr 03 '14 at 08:25
  • I really don't think it's anything to do with msiexec - if you're seeing a cmd window it must mean there's something going on that launches it via cmd window. There is no cmd window when you launch msiexec any other way, such as from a Start menu Run. – PhilDW Apr 03 '14 at 16:07
1

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+

Anders
  • 97,548
  • 12
  • 110
  • 164