Sign in to follow this  
Followers 0
Valuater

net send

4 posts in this topic

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

Share this post


Link to post
Share on other sites



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 ?


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Thanks... JdeB and Stumpii

"Message Service" was the problem

I placed the full code in the post named

Employee Time Clock

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
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
Sign in to follow this  
Followers 0