1234567891011121314151617181920212223242526272829 |
- using System.Diagnostics;
- using System.Linq;
- namespace Update.Util
- {
-
-
-
- public static class ProcessUtil
- {
-
-
-
-
-
-
- public static bool Start(string fileName, params string[] args)
- {
- Process process = new Process();
- process.StartInfo.FileName = fileName;
- if (args != null)
- process.StartInfo.Arguments = string.Join(" ", args.Select(arg => "\"" + arg + "\""));
- process.StartInfo.UseShellExecute = false;
- process.StartInfo.RedirectStandardOutput = true;
- process.StartInfo.CreateNoWindow = true;
- return process.Start();
- }
- }
- }
|