simulate key press in Dos app under Win98

how to simulate key press in DOS app running under win98 (in MS-DOS
Prompt)?

I have DOS which is started under Win. I want my app to do same like
when I am activating this Dos app and press arrow keys, Enter...