日本精品无码一区二区三区久久久,99久久国产综合色婷婷,7777精品伊人久久久大香线蕉,人人妻人人澡人人爽人人dvd,久久精品中文字幕

C# 打開(kāi)、運(yùn)行exe文件的三種方式

開(kāi)發(fā)技術(shù) 2016/4/17

方法一:
System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo(path);
info.WorkingDirectory = Path.GetDirectoryName(path); 
System.Diagnostics.Process.Start(info); 

方法二:
System.Diagnostics.Process.Start(path)

方法三:
string path = @"F:\2\"; //文件所在目錄
string filename = "a.exe";//文件名 
System.Diagnostics.Process p = new System.Diagnostics.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.StartInfo.WorkingDirectory = path;
p.Start();
p.StandardInput.WriteLine(filename);
p.StandardInput.WriteLine("exit"); 

中國(guó)· 上海

谷谷二維碼
添加微信咨詢

CopyRight?2009-2019 上海谷谷網(wǎng)絡(luò)科技有限公司 All Rights Reserved. 滬ICP備11022482號(hào)-8  

關(guān)于我們 | 聯(lián)系我們