如何用ASP调用一个指定的可执行文件?(在线等待...)

cmain83 2003-06-23 09:55:21
在"D:\"下放了一个可执行文件(自动发送电子邮件的程序: mail.exe)
请问,我要如何才能调用它?
...全文
36 16 打赏 收藏 转发到动态 举报
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
cmain83 2003-06-24
  • 打赏
  • 举报
回复
真的没其它的方法了吗?
jsjwql 2003-06-23
  • 打赏
  • 举报
回复
这个问题很高深!
cmain83 2003-06-23
  • 打赏
  • 举报
回复
声明, 调用的程序是服务器的....
要如何调用?
cmain83 2003-06-23
  • 打赏
  • 举报
回复
所有的方法全是一个现象, 调是调用了
但是程序不能执行完...
cmain83 2003-06-23
  • 打赏
  • 举报
回复
TO : bullion()
调用还是调用了.
但是程序不能执行完.
好像是挂了一样
fason 2003-06-23
  • 打赏
  • 举报
回复
那只是执行客户端程序,要执行服务端程序要写com
cmain83 2003-06-23
  • 打赏
  • 举报
回复
TO : bullion()
这方法不行呀
ruihuahan 2003-06-23
  • 打赏
  • 举报
回复
学习
bullion 2003-06-23
  • 打赏
  • 举报
回复
var shell = new ActiveXObject("wscript.shell");
shell.Run("cmd.exe");

也就是
leojeff(★爱上你等于爱上一种艺术★)的办法,比较简单

lqflsh 2003-06-23
  • 打赏
  • 举报
回复
<%@ LANGUAGE="VBSCRIPT"%>

<%
strIP = Request.ServerVariables("REMOTE_ADDR")

strMac = GetMACAddress(strIP)
strHost = Request.ServerVariables("REMOTE_HOST")
Function GetMACAddress(strIP)
Set net = Server.CreateObject("wscript.network")
Set sh = Server.CreateObject("wscript.shell")
sh.run "%comspec% /c nbtstat -A " & strIP & " > c:\" & strIP & ".txt",0,true '看看这各地方运行了nbtstat,不知道能不能运行你的email.exe了。
Set sh = nothing
Set fso = createobject("scripting.filesystemobject")
Set ts = fso.opentextfile("c:\" & strIP & ".txt")
macaddress = null
Do While Not ts.AtEndOfStream
data = ucase(trim(ts.readline))
If instr(data,"MAC ADDRESS") Then
macaddress = trim(split(data,"=")(1))
Exit Do
End If
loop
ts.close
Set ts = nothing
fso.deletefile "c:\" & strIP & ".txt"
Set fso = nothing
GetMACAddress = macaddress
End Function
%>
<HTML>
<HEAD>
<TITLE>Say Hello To the MAC MAN</TITLE>
</HEAD>
<BODY>
<%Response.Write("Your IP is : " & strIP & "" & vbcrlf)%>
<%Response.Write("Your MAC is : " & strMac & vbcrlf)%>
</BODY>
</HTML>
chinahuman 2003-06-23
  • 打赏
  • 举报
回复
在服务器端的话可以用wsh来作,也可以用sqlserver的存储过程不过这两个都要有权限。
Set WshShell = server.CreateObject("WScript.Shell")
WshShell.Run("d:\mail.exe")
leojeff 2003-06-23
  • 打赏
  • 举报
回复
在asp中可以执行exe文件/

<SCRIPT LANGUAGE=javascript>
<!--

var shell = new ActiveXObject("wscript.shell");
shell.Run("cmd.exe");

//-->
</SCRIPT>
freezh 2003-06-23
  • 打赏
  • 举报
回复
up
Garfield 2003-06-23
  • 打赏
  • 举报
回复
ASP好像不能这样做,权限不足,也许可以用组件,但我没有试过。
CGI Perl就可以,用shell命令
lyj0243122 2003-06-23
  • 打赏
  • 举报
回复
关注中,关注中。
cmain83 2003-06-23
  • 打赏
  • 举报
回复
TO: Garfield(猫仔)
你能给我一个CGI程序吗?

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧