2010-09-28 4 views
0

Dans mon projet NAnt, je voudrais déclencher un fichier batch et oublier. J'ai donc essayé tirer quelque chose comme ceci:Appel de lot NAnt asynchrone

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

Mais NAnt se plaint:

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

démar/c c: \ myBat.bat fonctionne si je le lance directement à partir de la ligne de commande. Des idées?

Répondre

3

Jetez un coup d'œil à ce AsyncExec task. En outre, IIRC start n'est pas un vrai programme mais une commande, c'est pourquoi vous obtenez cette erreur.

1

Une alternative plus simple à utiliser, il le:

<exec ... pidproperty="pid1" spawn="true" /> 
<exec ... pidproperty="pid2" spawn="true" /> 
<exec ... pidproperty="pid3" spawn="true" /> 
<waitforexit pid="${pid1}" /> 
<waitforexit pid="${pid2}" /> 
<waitforexit pid="${pid3}" /> 

Voir NAnt exec task et NAntContrib waitforexit task

Questions connexes