|Stated this is a Programming Forum question as there is no DOS in Windows XP, if serialterm.exe reads its input from stdin then it should accept data redirected from a text file holding the simulated user's input, e.g.|
serialterm.exe com1 9600 ascii empty no C:\test1.txt < input.txt
or as a better alternative
echo.User's Text | serialterm.exe com1 9600 ascii empty no C:\test1.txt
Anyway a program is required to READ data from a serial port while to send text to a serial device batch commands suffice.
What you need is not fully clear however.