C# 启动外部进程

C# 启动外部进程:

    var processInfo = new ProcessStartInfo(fullName);
    processInfo.UseShellExecute = false;
    processInfo.WorkingDirectory = Path.GetDirectoryName(fullName);
    Process.Start(processInfo);

如果不采用此方式, 被启动程序的工作目录更改为启动程序的目录, 假如被启动程序需要读取相对路径, 则会出现路径不正确的问题.

posted @ 2018-08-01 11:52  A_ning  阅读(1197)  评论(0编辑  收藏  举报