问题
I have a build step that needs to run a console application under a different (more privileged) user account.
However PsExec always returns with the exit code -1073741502.
I thought the issue was from my app but when I replace with the following it still fails:
PsExec.exe -accepteula -u Username -p Password "cmd.exe" /C
Or
PsExec.exe -i -accepteula -u Username -p Password "cmd.exe" /C
Note that TeamCity build agent runs under a user account created specifically for it. When I manually log in as that user and run the above commands they work fine.
来源:https://stackoverflow.com/questions/23340441/error-code-1073741502-when-running-psexec-through-teamcity