Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a .bat file which contains

call "c:\my path\myprog.exe"

but the command prompt says that call isn't a command.

share|improve this question
3  
Please don't cross post the same question on different sites. –  ChrisF Jan 16 '11 at 21:06
    
What's the exact error message? –  ultrasawblade Jun 15 '12 at 3:36

2 Answers 2

"c:\my path\myprog.exe" without START or call to execute your myprog.exe . that's how it's done in windows 7

share|improve this answer

Call is not for running other programs like that, it is strictly for calling other batch files. You probably want start if your program starts another window, else just type the command by itself on one line.

e.g.

start calc.exe
"C:\Stuff\Program.exe"
share|improve this answer
    
Needs some empty quotes or a title though. eg. start "" /b /i "C:\Stuff\Program.exe" The b switch supresses a new window and the i switch passes the current variables. –  paradroid Jan 16 '11 at 21:35
    
While the documentation for call states that it is for running batch files it has no problems running any other command as well. –  Joey Jan 25 '11 at 13:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.