Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Intranet Broadcast message??

Status
Not open for further replies.

OnAFan

Technical User
Mar 13, 2002
120
0
0
US
Hello Everyone, my question is this... is this possible using a form, submit a broadcast announcement within an intranet site? I wish to create a form, and on submit, have the message text appear in a broadcast announcement within the domain? (for example, Red Truck, Licence Plate #######, your lights are on). Any advice would be helpful. Thanks in advance,
Terry
 
In case anyone is interested... I got the answer from someone in the .asp forum...

<%
Set myexec = Server.Createobject("Dynu.Exec")

Response.Write("<PRE>")

REM the below line will execute the command "net send" and display its result.
Response.Write(myexec.execute("net send username message"))

'REM the below line will execute the command "ipconfig" and display its result.
'Response.Write(myexec.execute("ipconfig"))

'REM the below line will execute the command "nslookup -type=mx microsoft.com" and display its result.
'Response.Write(myexec.execute("nslookup -type=mx microsoft.com"))

Response.Write("</PRE>")

Set myexec = nothing
%>
 
I am interested, how do you execute this?
can you post the complete form including this script please.

Cheech

[Peace][Pipe]
 
Okay here goes... Create two page. Page one will have fields for who you want message to and message itself. Insert following form on page 1.
<form name="form1" method="post" action="broadcast.asp">
<input name="memTo" type="text" id="memTo">
<table width="90%" border="0">
<tr>
<td>
<input name="txtMess" type="text" id="txtMess"></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><input type="submit" name="Submit" value="Submit"></td>
</tr>

</table>
</form>


/////////////////////////////////////
Page two is called broadcast.asp
Somewhere on this page, insert the following
<%
dim MyMessage
MyMessage = "net"+ " " +"send" + " " + Request.Form("memTo")+" " + Request.Form("txtMess")

Response.Write(MyMessage)



Set myexec = Server.Createobject("Dynu.Exec")

Response.Write("<PRE>")

REM the below line will execute the command "net send" and display its result.
Response.Write(myexec.execute(MyMessage))

Response.Write("</PRE>")

Set myexec = nothing
%>
 
Nice one Lebisol. have grabbed a copy and will now try and figure out what to do with it lol

Cheech

[Peace][Pipe]
 
no problem, I am sure I will ask you how to do it later down the line ;-)
All the best!

> need more info?
:: don't click HERE ::
 
TerryWright,

I have tried your code as explained earlier in the thread however i get the following error message on the broadcast page


net send everyone test from Paul O
An error occurred while sending a message to EVERYONE.


System error 5 has occurred.


Access is denied.


Here is my code for the pages

Page1
Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form name="form1" method="post" action="broadcast.asp">
  <input name="memTo" type="text" id="memTo">
  <table width="90%" border="0">
       <tr>
      <td> 
        <input name="txtMess" type="text" id="txtMess"></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td><input type="submit" name="Submit" value="Submit"></td>
    </tr>
    
  </table>
</form>

</body>
</html>

Broadcast Page
Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
  <%
           dim MyMessage
MyMessage = "net"+ " " +"send" + " " + Request.Form("memTo")+" " + Request.Form("txtMess")

Response.Write(MyMessage)



Set myexec = Server.Createobject("Dynu.Exec")

Response.Write("<PRE>")

'REM the below line will execute the command "net send" and display its result.
Response.Write(myexec.execute(MyMessage))

Response.Write("</PRE>")

Set myexec = nothing
%>

</body>
</html>

Any help would be much appreciated



 
it's user rights issues
IWAM_machine user-Launch IIS Process Account
here is a discussion thread:

:--------------------------------------------------------------------------:
fugitive.gif

ok,ok...I did shoot the deputy but he told me he was the sheriff!
:--------------------------------------------------------------------------:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top