/bundles/itninjaweb/img/Breadcrumb_cap_w.png
Hey guys.. wasn't sure if this should go into the OS Forums..

Is there a way to run an MSI install called from MSIExec completely silent (/qn) AND synchronously?
When I do this, control is returned immediately to the cmd.exe
0 Comments   [ - ] Hide Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity

Answers

0
Why not call the msiexec command directly instead through cmd?
Answered 02/26/2009 by: AngelD
Red Belt

Please log in to comment
0
Actually.. it is and will be. This is a call inside a .net app. Process object's parameters are set as such to wait for exit in the .net code.
Answered 02/26/2009 by: jayteeo
Purple Belt

Please log in to comment
0
Sorry, are you launching the cmd or msiexec in "your" .net app?
Could you post the code that executes either one of them?
Answered 02/26/2009 by: AngelD
Red Belt

Please log in to comment
0
was calling msiexec.exe initially

basically something like this

Process RunInstall = new Process();
RunInstall.StartInfo.FileName = "msiexec.exe";
RunInstall.StartInfo.Arguments = @"/i mymsi.msi /lv* C:\mylog.log /qn";
RunInstall.Start();
RunInstall.WaitForExit();

I may have missed couple lines.. going off memory, too many windows open.

Process runs quickly and RunInstall.ExitCode is = 1620, which is an error indicating the package is not accessible. If you view the log file, it doesn't tell you much except that a 1620 occurred.
Answered 02/26/2009 by: jayteeo
Purple Belt

Please log in to comment
0
I am old school and create a batch file to accomplish this.

@echo off
start /wait APP.msi /qn
Answered 02/26/2009 by: mjschutt
Yellow Belt

Please log in to comment
0
good call mjschutt.. I'll just do that
Answered 02/26/2009 by: jayteeo
Purple Belt

Please log in to comment
0
Sound like the current directory isn't set correctly.

Try setting the WorkingDirectory property to the folder where the msi resides in, ex.:
RunInstall.StartInfo.WorkingDirectory = @"C:\bla\bla\";
Answered 02/26/2009 by: AngelD
Red Belt

Please log in to comment
0
Hey AngelD - I figured out what was causing the 1620 error. The MSI was on a network share that I was copying to the target machine.. somehow it was getting corrupted during the file copy. I did get it to exit with 0, however, it still does not run synchronously. I had to use start.exe with the /wait switch.
Answered 02/27/2009 by: jayteeo
Purple Belt

Please log in to comment