Run exe file with parameters in a batch file

batch-file, php, scheduled-tasks, windows

Solution

This should work:

start "" "c:\program files\php\php.exe" D:\mydocs\mp\index.php param1 param2

The `start` command interprets the first argument as a window title if it contains spaces. In this case, that means `start` considers your whole argument a title and sees no command. Passing `""` (an empty title) as the first argument to `start` fixes the problem.

Problem

Please have a look at my batch file. ``` echo off start "c:\program files\php\php.exe D:\mydocs\mp\index.php param1 param2" ``` but it isn't working. Any ideas how do I get it working?

Original source