Process p = new Process();
p.StartInfo.FileName = "文件名"
p.SratrInfo.Arguments = "运行参数"
p.Start();

解决方案 »

  1.   

    To 我想在c#中执行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);不过还是建议用Process.Start()。
      

  2.   

    用Process.Start()这种方法,我有多个参数应该怎么办。