Trouble installing bamboo as service on Windows 64
Asked by LexGFK:

I can run Bamboo on my windows server (Server 2016) through the console by running 'bin\\start-bamboo'. However when i try to install as a service, by running 'InstallAsService' i get the following error:  

C:\\Program Files\\Bamboo\>InstallAsService.bat

C:\\Program Files\\Bamboo\>???@echo off  
'???@echo' is not recognized as an internal or external command,  
operable program or batch file.

C:\\Program Files\\Bamboo\>setlocal

C:\\Program Files\\Bamboo\>set _PRG_DIR=C:\\Program Files\\Bamboo\\

C:\\Program Files\\Bamboo\>cd C:\\Program Files\\Bamboo\\

C:\\Program Files\\Bamboo\>set PATH=C:\\Program Files\\Java\\jdk1.8.0_144\\bin;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Users\\\<USERNAME-REMOVED\>\\AppData\\Local\\Microsoft\\WindowsApps

C:\\Program Files\\Bamboo\>"C:\\Program Files\\Bamboo\\bin\\service.bat" install Bamboo  
Installing the service 'Bamboo' ...  
Using CATALINA_HOME: "C:\\Program Files\\Bamboo"  
Using CATALINA_BASE: "C:\\Program Files\\Bamboo"  
Using JAVA_HOME: "C:\\Program Files\\Java\\jdk1.8.0_144"  
Using JRE_HOME: "C:\\Program Files\\Java\\jdk1.8.0_144\\jre"  
Using JVM: "C:\\Program Files\\Java\\jdk1.8.0_144\\jre\\bin\\server\\jvm.dll"  
Failed installing 'Bamboo' service

I've tried running the batch file through an administrative command prompt with no luck.

This is an increadably unhelpful error and i would like some help understanding whats going wrong here


Answers:
author: somethingblue
body: Hi Lex,

This could be due to the local user PATH being set in Environment Variables. Even if the local account has admin permissions which grants access to the system PATH, Bamboo will not see it unless the user PATH is removed.

Try this:

Remove the user %PATH% defined in Environment Variables

1. Right-click Computer/This PC \> Properties
2. Click **Advanced System Settings**
3. Click **Environment Variables**
4. In User Variables:
   1. select PATH variable
   2. click, Delete
5. Start JIRA

Hopefully that helps. If not, take a look at the article titled[???' is not recognized as an internal or external command](https://superuser.com/questions/601282/%CC%81-is-not-recognized-as-an-internal-or-external-command).

Cheers,

Branden

comments: author: LexGFK
body: Hi Branden

Thanks for the reply, unfortunately neither of these solved the issue. I have deleted my user PATH variable but that did not help. I also change the file to ANSI instead of UTF-8 but with no luck. The console window dump now looks like this.

C:\\Program Files\\Bamboo\>InstallAsService.bat  
Installing the service 'Bamboo' ...  
Using CATALINA_HOME: "C:\\Program Files\\Bamboo"  
Using CATALINA_BASE: "C:\\Program Files\\Bamboo"  
Using JAVA_HOME: "C:\\Program Files\\Java\\jdk1.8.0_144"  
Using JRE_HOME: "C:\\Program Files\\Java\\jdk1.8.0_144\\jre"  
Using JVM: "C:\\Program Files\\Java\\jdk1.8.0_144\\jre\\bin\\server\\jvm.dll"  
Failed installing 'Bamboo' service


author: LexGFK
body: [@somethingblue](/t5/user/viewprofilepage/user-id/1014184) Still haven't had any luck with this, are there any kind of logs somwhere i can have a look at? So far this has been a bad experience trying to get this set up, it really should not be this hard.


author: LexGFK
body: [@somethingblue](/t5/user/viewprofilepage/user-id/1014184) Any insights here?


author: Edwin Kyalangalilwa
body: Check permissions on the temp directory for the user running Bamboo

<https://confluence.atlassian.com/bamboo/running-bamboo-as-a-windows-service-289277308.html>

comments: author: LexGFK
body: I was running the installation .bat from an administrative command prompt, that should give full elevated privalages to anywhere in the ProgramsFiles directory right?


author: Edwin Kyalangalilwa
body: I meant the user that is currently running Bamboo ex. a user account or system account .. must have access to the temp directory


author: LexGFK
body: I tired making a new local user on the server, giving it full permissions to the bamboo-home folder and temp folder, and running the install batch file as that user but it did not work.. any other suggestions?