TeamCity Command Line build step does not actually run the cmd/batch file

I want to configure my Build configuration so that after my project is built successfully in Build step 1, TeamCity will run a .cmd file. To do that,I've added a second Build step into my build configuration which the Runner type is Command Line, and Command Executable is pointing to my .cmd file. For testing purpose, I just have the .cmd open the Windows Notepad application by a simple script "START C:\Windows\NOTEPAD.EXE". The .cmd file works when I double-click on it (Notepad is opened immediately). The problem is the Build configuration is running successfully through the two steps, but it seems the .cmd is never started. I've checked the build log and it said that the TeamCity has successfully started the .cmd file.
I've tried to update the two TeamCity windows services (TeamCity server and TeamCity Build Agent) to use Local System account, and then stop and restart both of them but it still doesn't work, the .cmd file is never actually started.

2 comments
Comment actions Permalink

Just reply to attache the build log file



Attachment(s):
AutoDeploy_Build_entire_solution_16338-build54.log.zip
0
Comment actions Permalink

Windows services cannot interact with desktop and open windows.
Change your script to do something simplier like adding a message to a build log

echo hello world

0

Please sign in to leave a comment.