Ver Mensaje Individual
  #9 (permalink)  
Antiguo 25/08/2004, 08:55
orharo2003
 
Fecha de Ingreso: abril-2004
Ubicación: México D.F.
Mensajes: 1.724
Antigüedad: 21 años
Puntos: 4
Utiliza WSH, (sucesor de archivos x lotes)

Hay te va un ejemplo :

<%@ LANGUAGE = VBScript %>



Msg = Request.Form("Msg")
NamUsr = TRIM(Request.Form("NamUsr"))
Computer = Request.ServerVariables("REMOTE_ADDR")

if Msg <> "" AND NamUsr <> "" THEN %>

<% Response.Write "<P>Sending message to "
Response.Write "<B>" & NamUsr & "</B>: "
Response.Write "This message " & Msg & "<br>"
Set server_shell = Server.CreateObject("wscript.shell")
server_shell.Run "%comspec% /c net send " & NamUsr & " [FROM: " & Computer & "] " & Msg

ELSE
'Displaying the form %>
<FORM NAME="Vorm" METHOD="Post">
To: <INPUT TYPE="text" NAME="NamUsr" SIZE="20" value="pc111"><BR>
Message: <textarea name="Msg" cols="40" rows="6"></textarea><BR>
<INPUT TYPE="submit" VALUE="Send Message">
</FORM>
<% END IF
%>