C# aspx.net要求可以启动 服务器上的指定应用程序。
如下代码只能启动用户本机上的某个程序(System.Diagnostics.Process.Start("程序路径");)要达到启动网站服务器上的指定路径程序应该如何做?

解决方案 »

  1.   

    var   wsh1=new   ActiveXObject("Wscript.Shell")   
    wsh1.run("notepad");[DllImport("shell32.dll")] 
     private static extern IntPtr ShellExecute(IntPtr hwnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, Int32 nShowCmd); 
    ShellExecute(IntPtr.Zero, "open", "c:\\windows\\notepad.exe", null, null, 1); Process process = new Process(); 
    process.StartInfo.FileName = "c:\\windows\\notepad.exe"; 
    activex控件
      

  2.   

    楼上大哥,能具体到操作步骤么?
    如:var  wsh1=new  ActiveXObject("Wscript.Shell") 定议放在什么地方?
    光用var 定义wsh1是不行的, 要引入什么东西?