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?