using golang example I created windows service application, as mentioned in documentation I configured with service user and password. I'm using a batch script that will execute
@REM install windows service using that application.
app install
timeout /t 5 /nobreak > NUL
@REM start service using sc.exe command.
sc.exe start testapp
it works fine with "Administrator" account.
But if the same service is installed under "test" user which had admin rights it, it won't star the service. I need to do manual log on from "services.msc" then it works, username and password are correct.
Is there any way I can do this log on in batch script? or this is expected behavior ?
Note that during "install" operation service username and password are configured with this "test" user. And "test" has "Log on as a service" rights based on this.