In the company I'm currently working, sending messages using "Net Send" in command prompt is the only way we can communicate in the LAN, everything else is blocked by the System Administrator. I thought that there should be a better way of typing "Net Send" over and over again. For this purpose, I wrote a simple batch file that would automate calling "Net Send" and "Net View", which can remember the last user you're sending message to, and other small things. For those who may want this, here's the source-script of the batchfile:
@echo off
echo Welcome to NETCHAT version 1.00
echo Created by Chris Vega
echo.
echo type ? in Message to get help
:setuser
echo.
set /p usr=User:
if %usr%==chuser goto setuser
if %usr%==list goto listusers_u
if %usr%==clear goto clearscreen_u
if %usr%==? goto showhelp_u
if %usr%==quit goto quithere
:setmsg
set /p msg=Message:
if %msg%==chuser goto setuser
if %msg%==list goto listusers
if %msg%==clear goto clearscreen
if %msg%==? goto showhelp
if %msg%==quit goto quithere
@net send %usr% %msg%
goto setmsg
:showhelp
echo.
echo [Available commands]
echo.
echo ? - Display this help
echo chuser - Change the user you are sending message to
echo list - Get the list of available users
echo clear - Clear the screen
echo quit - Exit
echo.
echo.
goto setmsg
:listusers
net view
goto setmsg
:clearscreen
cls
goto setmsg
:showhelp_u
echo.
echo [Available commands]
echo.
echo ? - Display this help
echo chuser - Change the user you are sending message to
echo list - Get the list of available users
echo clear - Clear the screen
echo quit - Exit
echo.
echo.
goto setuser
:listusers_u
net view
goto setuser
:clearscreen_u
cls
goto setuser
:quithere
Copy all the BLUE text above into notepad and save it to netchat.bat, run it, and enjoy chatting with "Net Send" using this batchfile. The script will keep looping until you typed "quit", thus simulating a very simple command interpreter based chatting program.
Attached is netchat.txt, you can download it as an alternative method above, then rename it to netchat.bat.
-chris