System.Diagnostics.Process.Star(应用程序名,参数);

解决方案 »

  1.   

    我在web应用程序中无法调用啊!!!
      

  2.   

    window的设计程序能用到WEB吗?没有试过,关注:_)
      

  3.   

    Process myProcess = new Process();

    myProcess.StartInfo.FileName = "cmd.exe";
    myProcess.StartInfo.UseShellExecute =false;
    myProcess.StartInfo.CreateNoWindow = true;//notice here!
    myProcess.StartInfo.RedirectStandardInput =true;
    myProcess.StartInfo.RedirectStandardOutput = true;
    myProcess.StartInfo.RedirectStandardError = true;
    myProcess.Start();
    StreamWriter sIn = myProcess.StandardInput;
    sIn.AutoFlush = true; StreamReader sOut  = myProcess.StandardOutput;
    StreamReader sErr= myProcess.StandardError;
    string cmd="dir";
    sIn.Write(cmd+System.Environment.NewLine);
    sIn.Write("exit" + System.Environment.NewLine);

    string s;
    string e;
    s = sOut.ReadToEnd();
    e = sErr.ReadToEnd(); if(myProcess.HasExited==false)
    {
    myProcess.Kill();
    }
    sIn.Close();
    sOut.Close();
    sErr.Close();
    myProcess.Close();
      

  4.   

    我现在有一个delphi的看图软件需要添加到我的web应用程序当中用来看图不知改如何处置,以上方法都试过了可是不行啊!!!!!!!!!!!!!!!!!!!!!!!
      

  5.   

    如果要在客户端使用,做成ActiveX控件就OK了。唯一麻烦的是代码签名