title: Teamcity to run .exe file on remote server
body: <p>We have a build server with Teamcity. It should run an .exe file on a Windows Server 2012 r2 machine after building. I have wasted a day trying to make it work different ways. The last realisation is: .bat file calling an .exe with the needed parameters on a producion server and command line command in teamcity:</p>
  
  <pre><code>psexec -i \\server-ip C:/SharedFolder/RUNME.bat
  </code></pre>
  
  <p>This works perfectly from command line, but Teamcity shows different errors with exit codes 4, 6 or even doesn't do anything without an error.</p>
  
  <p>How, HOW can I do it? Thanx.</p>