转自:http://qualilogy.com/en/migrate-sonarqube-tomcat-to-windows-service/
ps:stack overflow 简直是程序员的神器
I can launch this service, either with a ‘Start’ from this service, either executing the corresponding file in the ‘bin’ directory of SonarQube, from my DOS window.
But this will bring the following error message:
Same if I try to start the SonarQube service:
Now, if we open the service Properties (right click on the service to get the menus)…
…and goes on the tab ‘Log On’.
Check the box ‘This account’ and then the button ‘Browse’ :
In the following windows, click the button ‘Advanced’.
Then ‘Find Now’ in order to list the users who can connect (Log On) to launch this service.
I will select the Windows user I use to log on my laptop:
‘OK’ to validate. Notice that my Window user is prefixed with the ID of my machine (JPFPC).
‘OK’ again to get back to the ‘Log On’ tab, where I can enter the password corresponding to my user. ‘Apply’ then ‘OK’ to close the Properties window.
Now we can start again the service and … Yes, it works ! The error message has disappeared and the service displays a ‘Started’ status.