The How-To Geek Forums Have Migrated to Discourse

How-To Geek Forums / Tutorials

(Solved) - How to include enter keystroke in a batch file?

(4 posts)
  • Started 2 years ago by yugeshmkumar
  • Latest reply from yugeshmkumar
  • Topic Viewed 17110 times

Posts: 6

Hi Friends,

I am using a batchfile to run a simple program on my pc with help of scheduletask. but every time when the program executes it asks for user input ( RUN or END ), either i have to click on run or hit enter key to start the program. can anyone tell me how to make it run directly from the batchfile only.

this is what i am using in my batchfile :

" cd C:\Program Files\VIA\Registration Mail Sender

start /w RegMailSender_ThroughOutlook.exe "

please help me.

Posted 2 years ago
Posts: 6259

I don't think the problem is the START command itself but that the program is looking for something?

Not familiar with the program either? Bulk Mail Sender? Looks like it needs a parameter on the command line maybe? Change to the directory and run the program with a /? and see if it has any parameters you can give it?

Irv S.

Posted 2 years ago
Posts: 632

A Quote from
" A real FRQ (Frequently Recurring Question) is about sending key strokes to Windows GUI style programs. I'm sorry to tell you it cannot be done in batch language itself! But do not despair yet, Jonathan Bennett's AutoIt and Chris Mallett's AutoHotkey to the rescue."

So a couple of options :
The hard way to do it would be using Send Keys

The easier way is using autoit , and if needed autohotkey.

Accepted Answer · Posted 2 years ago
Posts: 6

Thanx a lot "ian2"

i tried the first link and it worked for me. i have wrote a vb script with help of it. now the problem is solved.

thanks again.

Posted 2 years ago

Topic Closed

This topic has been closed to new replies.