/build/static/layout/Breadcrumb_cap_w.png

Windows Installer Question

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   [ + ] Show comments

Answers (8)

Posted by: AngelD 15 years ago
Red Belt
0
Why not call the msiexec command directly instead through cmd?
Posted by: jayteeo 15 years ago
Purple Belt
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.
Posted by: AngelD 15 years ago
Red Belt
0
Sorry, are you launching the cmd or msiexec in "your" .net app?
Could you post the code that executes either one of them?
Posted by: jayteeo 15 years ago
Purple Belt
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.
Posted by: mjschutt 15 years ago
Yellow Belt
0
I am old school and create a batch file to accomplish this.

@echo off
start /wait APP.msi /qn
Posted by: jayteeo 15 years ago
Purple Belt
0
good call mjschutt.. I'll just do that
Posted by: AngelD 15 years ago
Red Belt
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\";
Posted by: jayteeo 15 years ago
Purple Belt
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.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ