Jump to content

net send


Recommended Posts

i have 5 different scripts from the archives in autoit... none work on my win XP

this was the "simplest" one

Do
$PC = InputBox("Message To", "Please Specify PC Name:")
If @error == 1 Then Exit
Until $PC <> " "

Do
$Text = InputBox("Message Text", "Enter your message.")
If @error == 1 Then Exit
Until $Text <> " "

RunWait(@comspec & " /c net send "& $PC &" "& $Text,"",@sw_hide)

if RunWait(@comspec & " /k net send "& $PC &" "& $Text,"",@sw_show) == 0 Then

MsgBox(0, $PC,"Message Sent")

Else
MsgBox(0, $PC,"Cannot Send Message")

EndIf

any ideas??

8)

NEWHeader1.png

Link to comment
Share on other sites

  • Developers

i have 5 different scripts from the archives in autoit... none work on my win XP

this was the "simplest" one

Do
$PC = InputBox("Message To", "Please Specify PC Name:")
If @error == 1 Then Exit
Until $PC <> " "

Do
$Text = InputBox("Message Text", "Enter your message.")
If @error == 1 Then Exit
Until $Text <> " "

RunWait(@comspec & " /c net send "& $PC &" "& $Text,"",@sw_hide)

if RunWait(@comspec & " /k net send "& $PC &" "& $Text,"",@sw_show) == 0 Then

MsgBox(0, $PC,"Message Sent")

Else
MsgBox(0, $PC,"Cannot Send Message")

EndIf

any ideas??

8)

<{POST_SNAPBACK}>

Script doesn't look correct to me... why would you want to do the Net Send command twice ??

Anyway ... it still should work.... what is the problem you have ?

Does Net Send typed from the commandline work for you ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I think that the net send twice should be changed to this:

$val = RunWait(@comspec & " /c net send "& $PC &" "& $Text,"",@SW_HIDE)

if $val == 0 Then

It seems to work though. I have only one computer on my network, so any net send commands I send come back with an error that the imaginary computer cannot be found (as expected).

Have you tried running the net send from the command line directly and seeing if it works? I also remember a service that is required to run for this to work. Before firewalls closed the port, I remember everyone disabling the service to avoid getting adds via net send. I think it was called 'message service'. Search the web and you will find it.

I am using XP also.

Edited by Stumpii

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...