I’m trying to install sonarcube 9 as a windows service on a windows server 2019.
At first i created an environment variable (SONAR_HOME) which directs to the root folder of sonar: C:\Services\sonarqube-22.214.171.124539
If I use “%SONAR_HOME%” in windows explorer, the sonar folder opens.
Now i try to install the service using this command in powershell ISE:
sc.exe create SonarQube binPath=""%SONAR_HOME%\bin\windows-x86-64\wrapper.exe" -s “%SONAR_HOME%\conf\wrapper.conf”"
It works and the service is created. But when i try to start the service, i always get an error:
“Service failed to start: The system cannot find the file specified”
But when i open the service properties and check the file paths to wrapper.exe and wrapper.conf both are correct and i can access both files using windows file explorer.
Also i’m able to start sonar using the .bat file “StartSonar.bat” - this works without any issue.
Anyone any idea for me?