Plink batch input menu prompt

I am automating voicemail backups and can use plink to login, but I want to pass input to the menu, not the linux shell:

This will log me in.....

c:\Batch>plink -ssh 10.12.99.64 -l root -pw 9999

I'd like to input an "S" with a "-m" remote command file for this, etc...

    MAIN MENU
(M) Mailbox maintenance
(R) Report generation
(S) System maintenance
(X) Exit
If you need help later, type ?.
COMMAND (M/R/S/X):

Thanks all.

Have you seen "expect"?

Maybe "autoexpect" can help you with your problem: autoexpect

EDIT: I just saw you are in Windows, but you can use autoexpect there: http://michaelellerbeck.com/2009/02/27/actually-getting-autoexpect-to-work-on-windows-solved/

I've had limited success, sometimes works, sometimes doesn't and adds returns... with redirection <vmbkup.txt containing "S", etc... (no quotes), but very inconsistent.