-->

WIX 3.8 msiexec.exe /quiet Error 1603

2020-08-01 06:32发布

问题:

I am using WIX 3.8, Windows 8 Pro, Visual Studio 2013, and I am doing a Silent Installation.

When I run with no /quiet arguments, Ir runs OK. But when I put "/quiet", nothin happend.

There is some problems with /qn Arguments... Any other Arguments Runs OK.

string arg = " SetupWIX.msi";

            Process p = new Process();

            p.StartInfo.FileName = "msiexec.exe";
            p.StartInfo.CreateNoWindow = true;
            p.StartInfo.Arguments = "/i " + arg +" /quiet /l*v log.txt";
            p.Start();

And it give error 3.

MainEngineThread is returning 1603.

Any Ideas?

Tahnks

回答1:

Based on the log you sent me, your MSI need to be elevated.

Not all MSI's do. Most do. If you are installer in a per-machine context and/or writing to restricted areas ( Program Files, HKLM, Windows an so on ) you'll need elevation. Typically when you double click an MSI the UI sequence runs as standard user and then when it transitions to the Execute sequence it'll prompt for elevation if required. However when you run /quiet it can't do that so it just fails instead. The two ways around this are to elevate the calling process or first 'advertise' the MSI so that the system trusts it. In that case the UI->Exec elevation happens automatically without a UAC request.



回答2:

I SOLVE IT!! Thanks yopu all for your time

I was MIssing

p.StartInfo.Verb = "runas";

I did not know I need Administrator Privilegies to execute "/quiet".