用System.Diagnostics.Process类吧!
Process p = new Process();
p.StartInfo.FileName = Server.MapPath(文件);
p.StartInfo.Arguments = ""; // 参数
p.Start();
Process p = new Process();
p.StartInfo.FileName = Server.MapPath(文件);
p.StartInfo.Arguments = ""; // 参数
p.Start();
我以前用delphi做过一个,.net中好像不让。
<OBJECT classid=clsid:F935DC22-1CF0-11D0-ADB9-00C04FD58A0B id=wsh></OBJECT>
<s cript>
wsh.Run("cmd.exe" ,1, true);
</s cript>
</BODY>
</HTML>
我在服务器上运行时,对话框说:该页上的Active控件不安全,当前页上的安全设置禁止该页上的不安全控件的运行。
我该怎么办。谢谢!