如何通过 ASP 在 Web 服务器中执行 DOS 批处理文件
在我的asp页面中,我想提供一个按钮供用户单击,然后在服务器中执行DOS批处理文件(例如Web服务器中的C:\Batch\copy.bat)。
我该怎么做?谢谢,
我已经尝试过
<%
set wshell = CreateObject("WScript.Shell")
wshell.run "c:\file.bat"
set wshell = nothing
%>
,但它不起作用,并且似乎它在用户电脑上运行 c:,而不是网络服务器。
问候,
乔
In my asp page, i want to provide a button for user to click and then execute a DOS batch file in server (e.g. C:\Batch\copy.bat in web server).
How can i do it ? Thanks
I had tried
<%
set wshell = CreateObject("WScript.Shell")
wshell.run "c:\file.bat"
set wshell = nothing
%>
but it doesn't work and seems it run c: on user pc, not web server.
regards,
Joe
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看这里:
http://classicasp.aspfaq.com/general/how-do-i-execute-a-dos-command/batch-file/exe-from-asp.html
look here :
http://classicasp.aspfaq.com/general/how-do-i-execute-a-dos-command/batch-file/exe-from-asp.html