Execute Batch File After Tfs Build

Posted on
Execute Batch File After Tfs Build

I have a post build batch file being executed after a TFS build. It compiles an Inno Setup script and places the generated exe in a drop folder. It then tries to run that exe and install the application on the server.

The scenario: you are using TFS 2010 as your build server, and you would like to deploy files to a remote server upon successful build by invoking a batch file. Do note that the. On TFS my batch file execution does not seem to happen, neither am I getting the echo message nor the notepad.exe opening. The Community TFS Build Extensions site provides a place for build engineers to share workflow activities, build process template files, PowerShell scripts and tools.

It runs the exe; however, this hangs the build. The issue is, it seems to execute it twice.

I can see 2 process running for the installer in task manager. If I execute the batch file manually, there are no issues - it's only when TFS executes it, I run into this problem. Post Build Batch File cd 'C: Program Files (x86) Inno Setup 5' iscc '%scriptDir% Script.iss' cd 'C: Deployment' start Installer.exe /VERYSILENT Any ideas would be greatly appreciated. Scratching my head with this.

From my findings, the post build script was NOT executing twice. Installer Windows 95 Dosbox. I believe the issue had something to do with permissions. The build service was being executed via the LocalService account which did not have permission to install the application. I THINK the build service tried to execute the installer but was denied and silently failed (and possibly tried again causing the additional installer process). Solution: Set the Build Service to run under a different account with the permissions to install applications.

I tried your suggestion and put the CopyDirectory activity after 'Try Compile, Test and Associate' activity and its perfectly working, btw, can anybody direct me on how to automate publishing/deploying web contents from development to staging(external server) then to production? Blood Money 2012 Full Movie Free Download here. Does it use CMS/Content Management System?

I can automate putting a zip copy of the web contents to staging through FTP, only problem is how can i extract and put it to the website directory. I'm thinking of a Web based File Manager with zip/unzip support but i can't find a.net version. Hi Arnel, If you want to execute a batch file you can use the InvokeProcess activity to do this. Open the build definition and open the toolbo and drag the InvokeProcess activity to the corresponing place in the build process workflow. For example, you can place it after the 'Try Compile, Test and Associate.'

Here is an example on how to use the InvokeProcess activity: If all you need is to copy a directory from one place to another, it is easier to use the CopyDirectory activity that is included in the toolbox instead. Regards /Jakob Blog: Twitter: http://twitter.com/osirisjakob.

I tried your suggestion and put the CopyDirectory activity after 'Try Compile, Test and Associate' activity and its perfectly working, btw, can anybody direct me on how to automate publishing/deploying web contents from development to staging(external server) then to production? Does it use CMS/Content Management System? I can automate putting a zip copy of the web contents to staging through FTP, only problem is how can i extract and put it to the website directory.

I'm thinking of a Web based File Manager with zip/unzip support but i can't find a.net version. Hi didn't want to raise a new thread as this one is a perfect description of what i want to do but the solution given is different to the question. My problem is this i have a build that on completion and succesfully passing tests i want to check in the resultant binaries back to tfs. I was doing this as post build task at project level but this would then check in regardless of the tests being run / completing successfully. So i looked to drop an InvokeProcess task into the workflow after it has completed. My batch file is stored in source control, so is delivered to the build server. Normally i would pass in $(solutionDir) xxx.bat as the location but the FileName box won't accept this.

So how do i call a batch file relative to the solution directory. Thanks Semaj.