C# 静默安装MSI

需要以管理员方式运行Visual Studio

Process installerProcess = new Process();
        ProcessStartInfo processInfo = new ProcessStartInfo();
        processInfo.Arguments = @"/i  D:\ActivexPractice\test\test\NewFolder1\setup.msi  /q";
        processInfo.FileName = "msiexec";
        installerProcess.StartInfo = processInfo;
        installerProcess.Start();
        installerProcess.WaitForExit();

你可能感兴趣的:(c#,开发语言)