
09/02/2002, 02:56
|
 | | | Fecha de Ingreso: diciembre-2001
Mensajes: 5.286
Antigüedad: 23 años, 4 meses Puntos: 1 | |
Re: Llamada al sistema operativo desde ASP mm en realidad no se lo que estas pidiendo pero te dejo unos ejemplos que tal vez te sirvan de guia saludos ...
<html>
<body>
<form action="asp_ping.asp" method="post">
Dominio/IP&nbsp;<input type="text" name="ip" value="127.0.0.1">&nbsp;<input type="submit" name="ping" value="Ping">
</form>
<hr>
<%
ip = request.form("ip")
if ip <> "" then
set objfilesystem = server.createobject("scripting.filesystemobje ct")
localdir = server.mappath((".")) & "\asp_ping\"
textfilename = localdir & "ping.txt"
batfilename = localdir & "ping.bat"
set wshshell = server.createobject("wscript.shell")
retcode = wshshell.run(batfilename & " " & ip & " " & textfilename, 1, true)
set objfile = objfilesystem.opentextfile(textfilename, 1)
content = objfile.readall
response.write replace(content, vbcrlf , "<br>")
end if
%>
</body>
</html>
<BLOCKQUOTE><font size=1 face=arial>Citando:<hr height=1 noshade>
Muestra como ejecutar y visualizar comandos de MS-DOS, en este caso muestra como visualizar los resultados de hacer un ping a una maquina.
[/QUOTE]
<html>
<body>
<%
on error resume next
set wshell = server.createobject("wscript.shell")
str_ruta = server.mappath("asp_ejecurar_dos/comandos.bat")
wshell.run (str_ruta)
response.write "Archivo: " & str_ruta & " ejecutado."
set wshell = nothing
%>
</body>
</html>
<BLOCKQUOTE><font size=1 face=arial>Citando:<hr height=1 noshade> Como poder ejecutar comandos de MS-DOS en el servidor, utilizando Windows Striping Host. [/QUOTE]
saludos espero que te sirva de algo... ;) :)
<embed src="http://www.autocar.com.mx/images/logo.swf" type="application/x-shockwave-flash" width="468" height="60" play="true" wmode="transparent" menu="false" loop="true"> |