How to run silent installer in C#

僤鯓⒐⒋嵵緔 提交于 2019-11-29 15:43:00

Try this, it works for me:

ProcessStartInfo psi = new ProcessStartInfo();
psi.Arguments = "–s –v –qn";
psi.CreateNoWindow = true;
psi.WindowStyle = ProcessWindowStyle.Hidden;
psi.FileName = "MyInstaller_7.1.51.14.exe";
Process.Start(psi);

I don't know if the arguments you provided tried to hide the window, but perhaps like this, part of it won't be neccesary anymore.

Note that I used "notepad.exe" for my tests which were successful. Perhaps your installer reacts differently.

Try running the installer directly:

string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
string installerPath = Path.Combine(desktopPath, "MyInstaller_7.1.51.14.exe");
Process.Start(installerPath, "–s –v –qn");
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!