Sunday, 14 April 2013

How to chat through LAN using command prompt?


Today I'm gonna tell you how you can chat with your friends, connected in LAN, using Command Prompt in Windows OS. These means you don't need to have any third party software or messenger installed on your system.

I'll also tell how you can create your own simple Chat Messenger.

First lets see how you can chat through Command Prompt. Just follow the below steps:

1)  Open Command Prompt. (Press Win+R and then type 'cmd' without quotes).
2)  Now type:

     msg <IP address> <actual message>           - For Windows7
     net send <IP address> <actual message>    - For WindowsXP

Here, instead of IP address you can put asterisk (*), then the message will be send to all those who are connected with you on the LAN. See the snapshots below for better understanding.




Now lets see how to create your own Chat Messenger. Follow the below mentioned steps:

1)  Open Notepad
2)  Copy the following code into it

      @echo off
      :start
      Cls
      echo MESSENGER
      set /p n=IP:
      set /p m=Message:
      msg %n% %m%                       ( If using WinXP replace 'msg' with 'net send' )
      Pause
      Goto start

 3) Save the file with .bat extension.

Done!!

Now, open the .bat file and you'll see the following appear in command prompt.

MESSENGER
IP:  < Here type the IP address of the computer you want to contact or put asterisk(*) >
Message:  <Type your message here>

Finally, it should look like this:
IP: ***.***.***.***
Message: Xas Message.



Hope you liked this post.. :)

No comments:

Post a Comment