要求才用WEB方法启动本地的应用程序,例如点击网页上的按钮,启动客户端的Word或其他的应用程序。

解决方案 »

  1.   


    Ⅰ. C#のprocess
    Process proc = new Process();                                                                 
    proc.StartInfo.FileName="cmd.exe";                                                                        proc.StartInfo.UseShellExecute = false;                                                          
    proc.Start();                                                                         
    proc.Close();   
    Ⅱ. JAVASCRIPT
    string scr = "function hello(){var WshShell = new ActiveXObject('WScript.Shell'); "+"WshShell.run('cmd.exe');}"; 
    MSScriptControl.ScriptControl sc = new MSScriptControl.ScriptControl();                                  sc.Language = "JScript";                                                                      
    sc.AllowUI = true;                                                                           
    sc.AddCode(scr);                                
    object[] parameters = new Object[0];                      
    sc.Run("hello",ref parameters);                                                                        
      

  2.   

    VBS
      Response.Redirect("../upload/test.vbs");
      

  3.   

    proc.StartInfo.FileName="cmd.exe";     
    程序运行在服务器端,也就是cmd.exe调用的是服务器端的
    这样可以调用客户端的cmd.exe吗??
      

  4.   

    为什么我用proc.Start(),
    程序只在线程里,而不会打开界面执行?