Script task unable to run file in Windows
If Bamboo starts as a Windows Service and a script task tries to execute a file, it may fail with the following message:
simple 10-Aug-2012 14:55:41 Starting task 'test' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.command' command 10-Aug-2012 14:55:41 Beginning to execute external process for build 'ABC-DEF-GH - Test - Default Job'<br /> ... running command line: <br />c:\windows\system32\cmd.exe<br /> /c<br /> c:\path\to\my\test.exe<br /> ApplyChanges<br /> EnableRecon<br /> 0<br /> ... in: C:\bamboo-home\xml-data\build-dir\131073\DEF-GH-JOB1<br /> ... using extra environment variables: <br />bamboo_IW_ASSETDB_USER=fkraemer<br /> build 10-Aug-2012 14:55:42 Command not found ApplyChanges ( EnableRecon, 0 )
The message may not be the same as the above.
This is generally caused by permissions problems. When Bamboo is started manually, the user that started it has permissions to run the
.bat file, but when Bamboo starts as a Windows service, no user is configured or the user configured in the Bamboo service does not have enough permissions to do the same, or this user configured in the service is not a local user, but a Windows domain user.
This also might be related to the file not being bundled the way to be used with a service.
Try to stop the Bamboo service (
Start Menu >> Run... > services.msc), start Bamboo manually (
BAMBOO_INSTALL/BambooConsole.bat), and try to run the plan again to see if the problem is indeed related to permissions.
If the plan is built successfully, then please go to
Bamboo service >> 'Properties' menu >> 'Log On' tab and check if the account configured there has permission to run the file. Please make sure the service is not using the USERNAME or SYSADMIN variable. It should be a real username.