1.Open notepad and type the following:-
@echo off
:A
cls
echo MESSENGER
set /p n=User:
set /p m=Message:
net send %n% %m%
Pause
Goto A
2.Save it as "Messenger.bat"(without quotes)
3.Now open command prompt
4.Drag this messenger.bat file over to command prompt window and press Enter.
5.Now type your friend's IP address and press Enter.
6.After that you can start chatting with your friend by typing the message.