各位大虾:  c#中怎样运行开始菜单中的运行命令(急).

解决方案 »

  1.   

    function ShellExecute(hWnd: HWND; Operation, FileName, Parameters,Directory: PChar; ShowCmd: Integer): HINST; stdcall;
    这个函数就可以实现.
    把这个函数封闭起来就是运行窗口.
      

  2.   

    给你个执行cmd的例子,你可以把其他命令替换,如msconfig等等
    导入:using System.Diagnostics;命名空间
       Process p = new Process();
       p.StartInfo.FileName = "cmd.exe";
       p.StartInfo.UseShellExecute = false;
       p.StartInfo.RedirectStandardInput = true;
       p.StartInfo.RedirectStandardOutput = true;
       p.StartInfo.RedirectStandardError = true;
       p.StartInfo.CreateNoWindow = true;
       p.Start();