using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; namespace ConsoleApplication1 { class Program { [DllImport("kernel32.dll")] public static extern int WinExec(string exeName, int operType);//添加申明调用的是系统提供的函数 static void Main(string[] args) { // WinExec(@"C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\MSDEV.EXE",3);//打开vc++6.0 System.Diagnostics.Process.Start(@"C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\MSDEV.EXE", @"D:liu.c");//使用vc++6.0打开liu.c文件 } } }
C#调用已经安装的程序打开文件,布布扣,bubuko.com
原文:http://blog.csdn.net/liu1164316159/article/details/24291951