I'm trying to setup a build using TeamCity and Leiningen, but I don't think this is particularly pertinent to my question.
There are two TeamCity services, one for the build server and another for a build agent. Both services are running under "Local System". The server is running Windows Server 2008 DataCenter [version 6.0.6002].
I've copied files into the folder C:\Windows\System32\config\systemprofile and I seem to be able to access them as the system account. By 'seem', I'm referring to being able to do the following from Command Prompt:
psexec -s \\localhost cmd ... foo bar
foo bar is the command that the TeamCity build agent should be running. [It's extremely unlikely that there's a difference in what the build agent is specified to do and what I did;
foo bar isn't much shorter than the actual one-line command.]
I restarted both TeamCity services but the same "... can not be found." error persisted. I restarted the server, as I suspected this might be similar to how services cannot access changes to environment variables until after the server has been restarted, but (alas) that did not seem to resolve the problem.
I now suspect this is an issue with TeamCity.
foo barand it's complaining about not being able to find a file with the exact full path of the file that exists. I'm able to run it while logged in as the same account as the one under which the service is running.
psexec -s \\localhost cmdruns Command Prompt as the Local System account.
\\localhostuse the entire and full directory.