using System.Diagnostics;System.Diagnostics.Process.Start("xxxx.exe")
例:
Process.Start("net.exe","send 128.128.7.22 kkk");
System.Diagnostics.Process.Start("cmd.exe","/c dir");
注:/c参数是执行完参数关闭窗口

解决方案 »

  1.   

    System.Diagnostics.Process.Start("可执行文件名")
      

  2.   

    直接使用即可:
    System.Diagnostics.Process.Start("x.exe");
    //x.exe文件在当前目录.
    如要制定目录,则同上
      

  3.   

    用个process控件呀,假设这个控件名叫
    process1.FileName = xxx.exe;
    process1.Start;
      

  4.   

    System.Diagnostics.Process ps = new System.Diagnostics.Process();
    ps.StartInfo.FileName = @"F:\OYAMA\OYAMA.GUI\bin\Debug\OYAMA.exe";
    ps.Start();
      

  5.   

    可是这样做的话,如果是DOS程序,不需要用户输入,可是还是会弹出一个难看的黑窗口,怎么样能够不弹出窗口,截取调用程序的输出流呢???
    谢谢
      

  6.   

    http://www.zpcity.com/arli/commonprj/cls_ProcessNew.cs用法:string s = ArLi.CommonPrj.ProcessNew.CrPocAndGetOutput(true,"ping.exe","localhost",null);MessageBox.Show(s);
      

  7.   

    使用ShellExecute来运行,可以控制可执行文件的各种属性[DllImport("shell32.dll"]
    long Function ShellExecute(
       long hwnd, 
       string lpOperation, 
       string lpFile,
       string lpParameters,
       string lpDirectory,
       long nShowCmd);ShellExecute(handle, NULL, <fully_qualified_path_to_folder>, NULL, NULL, SW_SHOWNORMAL);
    ShellExcute的使用方法可以参考msdn:
    ms-help://MS.VSCC.2003/MS.MSDNQTR.2003APR.1033/shellcc/platform/shell/reference/functions/shellexecute.htm
      

  8.   

    1.打开可执行文件:
    添加引用:
    using System.Diagnostics;
    实现:
    Process.Start("myfile.exe");
    2.打开帮助文件:
    添加引用:
    using System.IO;
    定义:
    private const string helpFile="D:\\newProgram\\OpenHelpFile\\csharp.chm";
    实现:
    FileInfo fi = new FileInfo(helpFile);
    Help.ShowHelp(this, helpFile);
      

  9.   

    System.Diagnostics.Process.Start("yourExe.exe")
      

  10.   

    (using System.Diagnostics;System.Diagnostics.Process.Start(".....exe")
      

  11.   

    System.Diagnostics.Process.Start("xxxx.exe")