views:

558

answers:

1

I am using the <'exec> task inside cruisecontrol.net. I am executing a .bat file and passing the arguments using <'buildArgs>. I need to pass in more than one arguments and I'm not sure what the correct syntax is. I am trying to do something like <'buildArgs>Arg1 Arg2<'/buildArgs> but it doesn't work.

+1  A: 

Try this:

  <exec>
    <executable>YourBatFile.cmd</executable>
    <buildArgs>Arg1 Arg2</buildArgs>
  </exec>

Then read the values in your bat file using %1 and %2

This is how I am doing it but it only reads my second arg2. This is what I have:<exec> <executable>:Path\test.bat</executable> <buildArgs>Arg1 Arg2</buildArgs> </exec> <exec>
It works now .Thanks