We are using TeamCity Build Server on a Windows 7 machine that uses a Build Agent which runs as a Windows Service.
As our build script is facing access problems (when trying to read from an Excel sheet), we tracked that issue down to a problem with privileges when we run that script from the BuildAgent Service using the default SYSTEM account. (= when we run it locally on our USER1 account with administrator privileges, it executes just fine).
The problem is very much like what is described at http://confluence.jetbrains.net/display/TCD6/Known+Issues#KnownIssues-AgentrunningasWindowsServiceLimitations, Section "Agent running as Windows Service Limitations"
Therefore, my question comes down to "how to run build agent as a different user"?
What we tried so far:
- we opened the Services dialog in windows (Administrative Tools - Services), and changed the "Logon As" property for "TeamCity BuildAgent" Service and "TeamCity Web Server" service from SYSTEM to our USER1. That didn't help though :-(
When I open the Build Agent Parameters in the web management view, I noticed that "user.name" says "SYSTEM". Can that be the problem's cause? Where could I change that value?
Appreciate any help!