Passing SPACE key to a batch file

March 15, 2011 at 08:37:49
Specs: Windows Vista

I start a program using a batch file. The batch file opens the program, but the program starts running only when the user presses the SPACE key. I am not sure how to incorporate the SPACE key argument in the following batch command.

start /w /max "" "C:\Users\Administrator\Documents\Projects\Rpractice.exe"


See More: Passing SPACE key to a batch file

Report •

March 15, 2011 at 09:08:18
If the program accepts the space from stdin the following would work, otherwise you have no chances.

start "" /W /Max echo. | "C:\Users\Administrator\Documents\Projects\Rpractice.exe"

Report •

March 16, 2011 at 03:46:15
Have a look at:

Happy is ONE who says I am an OttoMAN.

Report •

March 16, 2011 at 08:16:05
Thanks IVO.

When I use the command you suggested, I am getting the following error message.

"Windows can not find ‘echo.’ Make sure you typed the name correctly and then try again…"

Also, when I removed the period after 'echo', and I did not get the error. The program opens but doesn't sart running. It seems it doesn't get the space key. Also I get two black windows. One of them is the regular cmd.exe window showing the batch command. The other black window shows the following: Echo is on. Not enough sotrage is available to process this command.

I am not sure what to do.

Report •

Related Solutions

March 16, 2011 at 14:59:41
have you what MU's said ?

or try this from a batch file.

@echo off
echo Set WshShell = WScript.CreateObject("WScript.Shell") >temp.vbs
echo "C:\Users\Administrator\Documents\Projects\Rpractice.exe " >>temp.vbs
echo wscript.sleep 1000 >>temp.vbs
echo wshshell.sendkeys " ">>temp.vbs
cscript /nologo temp.vbs

Subhash Chandra.

Report •

Ask Question