Ver Mensaje Individual
  #3 (permalink)  
Antiguo 09/02/2002, 02:56
Avatar de urjose
urjose
 
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 <input type="text" name="ip" value="127.0.0.1"> <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]


&lt;html&gt;
&lt;body&gt;

&lt;%
on error resume next
set wshell = server.createobject(&quot;wscript.shell&quot;)
str_ruta = server.mappath(&quot;asp_ejecurar_dos/comandos.bat&quot;)
wshell.run (str_ruta)
response.write &quot;Archivo: &quot; &amp; str_ruta &amp; &quot; ejecutado.&quot;
set wshell = nothing
%&gt;

&lt;/body&gt;
&lt;/html&gt;


<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">