Forum Moderators: open

Message Too Old, No Replies

sending a net send message via ASP or ASPX

         

laura2k

4:04 pm on Apr 16, 2004 (gmt 0)



Hi,

Can anyone please tell me how i can send a net send message to an IP address using ASP or ASPX? i know it can be done as i've seend some sites using it.

Many thanx in advanced.

Thanx
Laura

sjgould

4:33 pm on May 7, 2004 (gmt 0)

10+ Year Member



Use the code below, do you know how you could put html or an image in the pop up box?

<%@ LANGUAGE = VBScript %>

<%
' Sending a message using NET SEND on a Windows NT network
' Send a message to any user on a network using your browser (!)

'Checking for all necessary variables.


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

Easy_Coder

9:39 pm on May 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



sjgould

That's an awesome script...

Krapulator

7:08 am on May 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Why would you want to do such an instusive thing?

sjgould

12:32 pm on May 11, 2004 (gmt 0)

10+ Year Member



he people in here want to see a hugh pop up as a few people missed the standard small box

esplendidos

1:19 pm on May 11, 2004 (gmt 0)



Hi! sjgould

I tried you're script but i get this error msg!

All my rights seems ok!

You're script seems to run directly from the web server,but can it be done localy?

Thanks for you're help!

sending message to p0515374: This message test

Microsoft VBScript runtime error '800a0046'

Permission denied

/qmanager/netsend.asp, line 35

markus007

11:48 pm on May 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Next time someone from nigeria browses my site i can send them a "get lost message"

me2000r

6:18 am on Jul 6, 2004 (gmt 0)



Hey!

esplendidos: I tried sjgould's script too and got the same error.

sjgould: do we need to change permissions for some files? I am using windows server 2003, IIS 6. Is that script supposed to work over the internet as well as intranet?

Thanks,
Ryan