Question

I'm implementing a continuous integration scenario for a SharePoint deployment. After all features have been build on the build server, I'm attempting to deploy the new features to the test server by running STSADM commands through PSEXEC.

When I run my script from any machine where I'm logged in, it runs fine. When I add an exec command to my team build project

 <Target Name="AfterDropBuild">
       <Exec Command="c:\progra~1\pstools\psexec.exe \\testserver -u mydomain\mydomainuser -p mypassword \\BuildServer\CurrentBuild\DeploymentFiles\Deploy.cmd" />
  </Target>

The build partially fails, and I get an error that access is denied in my build logs:

Task "Exec"
  Command:
  "c:\progra~1\pstools\psexec.exe \\testserver -u mydomain\mydomainuser -p mypassword \\BuildServer\CurrentBuild\DeploymentFiles\Deploy.cmd"
  Access is denied.

I've added the TFS Service account as a local admin on both the build server and the test server.

Any ideas of why this might be working on any box where I'm an interactive user, but not when psexec is run from the build agent?

Was it helpful?

Solution

It was a permissions issue accessing psexec in the program files directory. I added read permissions to the tfs service and it fixed the issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top