C# 运行程序的方法
Process p = new Process();
p.StartInfo.FileName = "文件名"
p.SratrInfo.Arguments = "运行参数"
p.Start();
---------------------------------------------------------------
或者使用ShellExecute这个API函数,
[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("notepad"),
new StringBuilder(""),
new StringBuilder(@"C:"), 1);