Run exe from TFSDeployer

Oct 7, 2010 at 9:38 PM
Edited Oct 7, 2010 at 9:38 PM

If I was to specify a path to an .exe instead of a powershell file would the TFS deployer run it instead or does it have to be a powershell script?

Oct 7, 2010 at 11:24 PM


In the DeploymentMappings.xml file the Mapping element supports a RunnerType attribute with the values "PowerShell" or "BatchFile". If you use "BatchFile", TFS Deployer will run the command specified by the Script attribute and pass drop location, build number, and any other parameters as arguments to the command.

For example, this mapping:

<Mapping ... Script="HelloWorld.exe" RunnerType="BatchFile">
   <ScriptParameter name="SomeOtherArg" value="TheArgValue" />

Will run this command:

%DeployerTempDir%\HelloWorld.exe "\\server\drops\build123\" "MyBuild123" "TheArgValue"

However, if these arguments don't match what your exe is expecting, use a batch file instead and have it call the exe with the appropriate arguments in the expected order.