C# Process调用应用程序失败时应注意的问题

 C#中如果采用Process调用应用程序失败,请添加下列第一行,设置应用程序所在的路径。                  

 

        Directory.SetCurrentDirectory([应用程序所在路径]);
                    Process process = new Process();
                    process.StartInfo.FileName = [应用程序名称];
                    process.StartInfo.Arguments = [调用参数];
                    process.StartInfo.UseShellExecute = false;
                    process.StartInfo.CreateNoWindow = true;
                    process.Start();
                    process.WaitForExit();

上一篇:程序员的幽默


下一篇:To腾讯:强行收集用户个人隐私的行为不可饶恕