现在的位置: 首页 > 综合 > 正文

C# 指定打开文件方式打开文件

2013年10月01日 ⁄ 综合 ⁄ 共 352字 ⁄ 字号 评论关闭

 

// 目标文件路径

 string StartPath = Application.StartupPath + @"\scripts\starthw.bat";

 

// 选择打开方式文件路径

 

//记事本

string NotPath = System.Environment.SystemDirectory + "\\notepad.exe";

//sakura
string SakuraPath = @"C:\Program Files (x86)\sakura\sakura.exe";

 

System.Diagnostics.Process.Start(NotPath, this.StartPath);    

 

System.Diagnostics.Process.Start(SakuraPath, this.StartPath);   

 

抱歉!评论已关闭.