Visual Studio task fails when running Bamboo as a Windows service

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

All builds work fine when running the Bamboo server from the command line. However, some builds fail when Bamboo is started as a Windows Service. For example, a Visual Studio task shows this errors:

1 2 3 4 5 simple 24-Oct-2012 14:08:20 Starting task 'Buid using Visual Studio 2010' of type 'com.atlassian.bamboo.plugin.dotnet:devenv' command 24-Oct-2012 14:08:20 Beginning to execute external process for build 'Plan Name - Default Job'\n ... running command line: \nC:\bamboo-home\DotNetSupport\devenvrunner.bat\n C:\bamboo-home\xml-data\build-dir\Proj1-Plan1-JOB1\n C:\Program Files (x86)\Microsoft Visual Studio 10.0\n x86\n test.sln\n /build\n Release\n ... in: C:\bamboo-home\xml-data\build-dir\Proj1-Plan1-JOB1\n error 24-Oct-2012 14:08:20 'findstr' is not recognized as an internal or external command, error 24-Oct-2012 14:08:20 operable program or batch file. error 24-Oct-2012 14:08:20 The process tried to write to a non

The error message might be different for other failing tasks.

Cause

This is generally caused by account permissions of the user who runs the Bamboo service. By default, Bamboo uses a SYSTEM user, and this might cause some issues.

Resolution

Make sure to use a local admin user to run the Bamboo server as per Running Bamboo as a Windows service as the local user article.

After setting up, if you still see errors, please check the User PATH variable. There is a great chance you have a PATH (user environment variables) overwriting PATH (system environment variables). Remove the contents of the User PATH and, if needed, append to the System PATH (using %USERPROFILE%).

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.