SC.EXE create MyService
DisplayName= "My Service"
SC.EXE DESCRIPTION MyService "My Alert Service"
NET START MyService
During installation I got the below error and the service failed to start though it got installed.
System error 1069 has occurred.
The service did not start due to a logon failure.
When I added the username and password manually to the service and started it manually it worked fine.
Then I modified the installation script and added the following command before creating the service which worked fine in installing and starting the service from the package itself.
ntrights.exe -u Myserviceuser +r SeServiceLogonRight
The command ntrights grants the Logon as a service rights to the user.
You can find this article in the link BeyondRelational