C#调用cmd命令执行msi安装文件
来源:互联网 发布:艾力绅 知乎 家用 编辑:程序博客网 时间:2024/06/03 20:04
string strInput = @"msiexec /i D:\Install.msi /qb";
Process p = new Process();
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
Process p = new Process();
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
p.StandardInput.WriteLine(strInput + "&exit");
p.StandardInput.AutoFlush = true;
string strOuput = p.StandardOutput.ReadToEnd();
p.WaitForExit();
p.Close();
阅读全文
1 0
- C#调用cmd命令执行msi安装文件
- C# 调用执行CMD命令
- c# 调用CMD命令执行dos命令
- c#中调用cmd命令执行批处理文件
- c#中调用cmd命令执行批处理文件
- C#调用CMD对话框并执行命令
- C#调用cmd执行ftp命令
- C#程序中调用cmd执行命令
- C#程序调用cmd.exe执行命令
- C# Process方法调用cmd执行命令
- C# 执行CMD命令
- C# 执行CMD命令
- C#执行CMD命令
- c# 执行CMD命令
- c#执行cmd命令
- C# 003 C#调用cmd.exe执行命令
- C#调用CMD命令
- C# 调用 CMD 命令
- 常用SQL语句
- PHP常用函数
- 在MFC中调用深度学习caffe,出现的问题。
- Activity的生命周期
- 线段树详解(洛谷模板题)
- C#调用cmd命令执行msi安装文件
- 三种方式获取Class
- Java运行时数据区域
- iOS 各种demo链接汇总~模糊效果
- 使用eclipse自带的git从github上clone和上传项目
- 博客搬家
- IntelliJ IDEA中怎么查看方法说明快捷键
- 设置点击事件的工具类
- php项目中使用的必记词汇