Page 1 of 2 12 LastLast
Results 1 to 40 of 44

Thread: Send message with NetSend through LAN?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2003
    Posts
    21

    Talking Send message with NetSend through LAN?

    hi guys, I m trying to make a little program in VB that will send messages across a LAN via netsend.
    I want a text box where they type the IP of the computer they wish to send a message to, then i want a text box that they can type their message into and then the click send and it sends it via netsend to the address, but i really dont know how i can link what they type in my programs text box to what they type in Command Prompt????

    /edit i need what they type in my programs text boxes to come up in Command Prompt.

    Any help greatly appreciated
    Last edited by -Colli$ion-; Dec 20th, 2003 at 06:31 AM.

  2. #2
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    you should make thread titles more descriptive

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Dec 2003
    Posts
    21
    sorry lol i really didnt have a clue what to call it

  4. #4
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    You will get people who can help you better this way, as they know exactly what you are after. Try naming the thread:

    "Send message with NetSend through LAN?"

    Just edit your first post to change the thread title

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Dec 2003
    Posts
    21
    Done.

  6. #6
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Good one dude, welcome to the forums

    Anyway, have you looked at www.pscode.com for examples on this? Theres loads of examples with source code for similiar things. Otherwise you can search the forums here

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Dec 2003
    Posts
    21
    www.pscode.com not working for me and i tried searching before i posted hehe, hi btw

  8. #8
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Ok, yeah it doesnt work, try:

    www.planet-source-code.com

    If that doesnt work, maybe there server is down

  9. #9
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253

  10. #10

    Thread Starter
    Junior Member
    Join Date
    Dec 2003
    Posts
    21
    ok www.planet-source-code.com didnt work but the other ones did ty m8

  11. #11
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    no probs dude, just check pscode later, there are some very good full complete applications with source code. Though some are crap

  12. #12

    Thread Starter
    Junior Member
    Join Date
    Dec 2003
    Posts
    21
    i've also noticed in VB i dont have an option to export only save

  13. #13
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    By Export you mean compile your program into an executable (exe)?

    If so, what version of Visual Basic are you using?

    Enterprise Architect
    Professional?

  14. #14

    Thread Starter
    Junior Member
    Join Date
    Dec 2003
    Posts
    21
    Microsoft Visual Basic 6.0 and yea i do mean compile

  15. #15
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Microsoft Visual Basic 6.0 "-----------"??

    Theres different version of 6.0 with different license agreements. When you first load VB up, it says Professional, Enterprise etc. What does yours say?

  16. #16

    Thread Starter
    Junior Member
    Join Date
    Dec 2003
    Posts
    21
    /////edit its proffesional edition

  17. #17
    Lively Member
    Join Date
    Aug 2002
    Location
    England
    Posts
    84
    Answering the original question here

    VB Code:
    1. Shell "cmd /c net send " & txtIP.Text & " " & txtMessage.Text, vbHide

    Where txtIP is the textbox holding the IP or hostname of the computer, and txtMessage holds the message... I have a funny feeling this will only work on Windows 2000/XP. If it doesn't work, try replacing "cmd" with "command"
    Anticipation of death is worse than death itself

  18. #18

    Thread Starter
    Junior Member
    Join Date
    Dec 2003
    Posts
    21
    ok m8 i will give it ago

    ty for the time you guys spent on me

  19. #19
    Lively Member
    Join Date
    Aug 2002
    Location
    England
    Posts
    84
    No problem. Oh, and unless you have the learning edition of Visual Basic 6 (in which you can't compile your projects into executables), you should be able to do it by clicking

    File -> Make [project_name_here].exe...
    Anticipation of death is worse than death itself

  20. #20

    Thread Starter
    Junior Member
    Join Date
    Dec 2003
    Posts
    21
    Originally posted by Walter
    Answering the original question here

    VB Code:
    1. Shell "cmd /c net send " & txtIP.Text & " " & txtMessage.Text, vbHide

    Where txtIP is the textbox holding the IP or hostname of the computer, and txtMessage holds the message... I have a funny feeling this will only work on Windows 2000/XP. If it doesn't work, try replacing "cmd" with "command"
    so do i have to name the text box where the ip is "txtip" so it looks for it there?

    sorry about this but i am very new to VB infact first time today lol

  21. #21
    Lively Member
    Join Date
    Aug 2002
    Location
    England
    Posts
    84
    yeah, the textbox where the user will enter the IP address will have to named "txtIP". same goes for the textbox for the message
    Anticipation of death is worse than death itself

  22. #22

    Thread Starter
    Junior Member
    Join Date
    Dec 2003
    Posts
    21
    yep tried it and it works hehe ty guys lol i m really interested in this stuff now just got to figure out how to export (complie) my program

  23. #23
    Lively Member
    Join Date
    Aug 2002
    Location
    England
    Posts
    84
    Originally posted by Walter
    Oh, and unless you have the learning edition of Visual Basic 6 (in which you can't compile your projects into executables), you should be able to do it by clicking

    File -> Make [project_name_here].exe...
    Anticipation of death is worse than death itself

  24. #24
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Not to be discouraging, but if this is your first day, shouldnt you practice on simpler apps first?

  25. #25
    Lively Member
    Join Date
    Aug 2002
    Location
    England
    Posts
    84
    Simpler? It's hard to think of simple apps that actually do something, and teach you stuff at the same time. And really, this isn't all that difficult. Two textboxes, a command button and one line of code
    Anticipation of death is worse than death itself

  26. #26
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Yeah i guess, but really Text Editors can be fun at first and do learn you.

    You learn how to Open/Save with dialogs
    Work with the clipboard
    Manage fonts, bold, formatting etc

    Thats where i started, i skipped crappy Hello World Apps!

  27. #27
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Oh, i thought this kind of app would require Winsock or something on those lines. Or it that just used for sending and reieciving data over the internet?

  28. #28
    Lively Member
    Join Date
    Aug 2002
    Location
    England
    Posts
    84
    Hello World

    Infact, I think I've started nearly every programming language I've tried with a Hello World app

    See your point about text editors though, they do teach a bit more...

    And yeah, winsock is mainly used for sending data over the internet. This is just using an internal function of Windows, so nothing overly complicated is needed.
    Anticipation of death is worse than death itself

  29. #29
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Ok, theres a question i have here then. Say if you have a newtwork of 10 computers, named:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10

    Say if i am using computer 1, where do you specify the computer name? Or is that done by IP? If its done by IP wont you need to retrieve the IP address first, so you know what it is?

  30. #30
    Lively Member
    Join Date
    Aug 2002
    Location
    England
    Posts
    84
    Well, you should already know either the IP or the hostname

    If you wanted to send a message to computer number 10, and because they are named that way, you just:

    "net send 10 hello world!"

    This will pop up a message box style window at the computer named '10', with "Hello world" in it. Because net.exe comes with Windows 2000/NT/XP, all the rest is handled by Windows... nothing else needed. As long as the network is properly set up that is
    Anticipation of death is worse than death itself

  31. #31
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Ok lol, so does it not support Win9x?

  32. #32
    Lively Member
    Join Date
    Aug 2002
    Location
    England
    Posts
    84
    Originally posted by Madboy
    Ok lol, so does it not support Win9x?
    Technically... no

    Although in Windows 9x there's a thing called "WinPopup", which lets you send and receive the same messages... even those sent from a Win 2k/NT/XP machine. Only problem is it needs to be running to receive messages, unlike the "messenger service" (for Windows 2k/NT/XP), which is always running and invisible.

    So technically... yes
    Anticipation of death is worse than death itself

  33. #33
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Doh. Anyway at my college they use WinMe, so i might send prank messages one day

  34. #34
    Lively Member
    Join Date
    Aug 2002
    Location
    England
    Posts
    84
    Originally posted by Madboy
    Doh. Anyway at my college they use WinMe, so i might send prank messages one day
    Anticipation of death is worse than death itself

  35. #35
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906
    Originally posted by Madboy
    Ok, theres a question i have here then. Say if you have a newtwork of 10 computers, named:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10

    Say if i am using computer 1, where do you specify the computer name? Or is that done by IP? If its done by IP wont you need to retrieve the IP address first, so you know what it is?
    In Win 9x/Me you can only use the NetBios name of the computer or its IP address. What's more the computer you are sending the message to must be on the same network segmant as you are unless you have a WINS server running, in which case you'd need to be in the same worrkgroup and or domain.

    From Windows 2000 TCP/IP is used and you can therefore send messages over larger networks. It is even possible to send a message over the internet if the user has left NetBios ports open.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  36. #36
    Fanatic Member x-ice's Avatar
    Join Date
    Mar 2004
    Location
    UK
    Posts
    671
    i made a program that should suite your needs, its one of the best on the internet

    Download Here

  37. #37
    Lively Member
    Join Date
    Aug 2002
    Location
    England
    Posts
    84
    Originally posted by visualAd
    In Win 9x/Me you can only use the NetBios name of the computer or its IP address. What's more the computer you are sending the message to must be on the same network segmant as you are unless you have a WINS server running, in which case you'd need to be in the same worrkgroup and or domain.

    From Windows 2000 TCP/IP is used and you can therefore send messages over larger networks. It is even possible to send a message over the internet if the user has left NetBios ports open.
    Old thread

    If I remember rightly, net send isn't supported in Win 9x/ME, so it won't work anyway Also, you can configure most Windows to use the TCP/IP protocol, but not sure about sending messages to older Windows versions over the Internet.

    And yeah, you either have to specify the IP address or NetBios name... I mean, what else is there?

    Anyways, old thread!
    Anticipation of death is worse than death itself

  38. #38
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906
    Originally posted by Walter
    And yeah, you either have to specify the IP address or NetBios name... I mean, what else is there?
    Windows 2000 can also resolve host names via DNS.

    I've never tried it before but in Windows 2000 it is possible to send a message to any computer with certain ports open. I don't think this is possible using net send - however there are pieces of software out there that can. As you can porbably imagain spammers got wind of it and were flooding people with pop up messages like:

    "Your computer has viruses - goto www.virus.co.uk to scan and remove them."

    Most firewall software now blocks the offending port which allows you to do this.

    In Windows 98/98 you could install a utility called Winpopup which allowed you to send messages between computers in the same way net send does. However this software doesn't actually popup a message box - it just appears in the main window.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  39. #39
    Junior Member
    Join Date
    Jan 2003
    Location
    QLD, AUSTRALIA
    Posts
    17
    I made a program that send msgs through winsock in 2 ways

    1) In a chat room style
    2) A msgbox pops up with ur msg on the other comp.

    both used winsock and in both u have to type in the other persons ip to send to them.
    Amazingly they worked.

  40. #40
    Lively Member
    Join Date
    Aug 2002
    Location
    England
    Posts
    84
    Originally posted by visualAd
    Windows 2000 can also resolve host names via DNS.
    Hostname or IP address, basically

    And the popup ad's you mentioned use net send... as long as port 139 (NetBios) is open and the Messenger service is running on the remote computer, you can send a message to it. Even to Win 9x/ME computer if WinPopup is open.
    Anticipation of death is worse than death itself

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width