[System.Runtime.InteropServices.DllImport("shell32.dll")]
public static extern int ShellExecute(IntPtr hwnd, StringBuilder lpszOp, StringBuilder lpszFile, StringBuilder lpszParams, StringBuilder lpszDir, int FsShowCmd);
引用这个代码,然后再你需要关闭的时候进行调用
例如:
ShellExecute(IntPtr.Zero, new StringBuilder("Open"), new StringBuilder("xxxx.exe"), new StringBuilder(""), new StringBuilder(path), 1);
只需要更改:xxxx.exe改为你需要更改的程序名称,path为需要打开程序的路径 ,其他都不用变