Search code examples
batch-filenant

Asynchronous NAnt batch call


In my NAnt project, I'd like to fire off a batch file and just forget about it. So I tried pulling something like this:

<exec program="start" commandline="cmd /c c:\mybat.bat" />

But NAnt complains:

'start' failed to start
    The system cannot find the specified fileBlockquote

start cmd /c c:\mybat.bat works if I run it straight from the command line. Ideas?


Solution

  • Take a look at this AsyncExec task. Also, IIRC start is not a real program but a command, which is why you're getting that error.