Tag: TeamCity

TeamCity agent doesn’t show the application window when a build is run

If you are running TeamCity agent as a service in Windows you probably noticed that you cannot see any application window that your build agent is running.

You don’t see any window because, for security reasons, the latest versions of Windows runs services in Session0 and not Session1. Sometimes you need to see it, specially if you running tests. If you need to run TeamCity agent on Session1 and not Session0 and be able to see what is going on without having to access Session0 you shouldn’t be running your TeamCity agent as a service.

In the installation wizard, you should untick the option to install the agent as a service:


After installing it, you need to configure the build agent to be run automatically when the machine starts. You need to add a shortcut to “<installation path>\bin\agent.bat start” in “C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup” for all users.

Reference: https://confluence.jetbrains.com/display/TCD9/Setting+up+and+Running+Additional+Build+Agents#SettingupandRunningAdditionalBuildAgents-agent_start_windows