I have a windows service. The logon user of this service is set to 'domain1\user1'. Its set to delayed start and it works fine. Now, due to regular housekeeping maintenance, we need to stop this service, perform maintenance and start it back again on a regular schedule. I've written a batch file for that. We are using BMC Control M and I've set 'domain1\user1' as the account under which this batch file executes. But when the bat file tries to execute 'net stop servicename' statement, I get error... System error 5 has occurred.Access is denied.
I though that the logon user will automatically get the the start/stop permissions. But that doesn't seems to be the case. And I may have to do something like this... https://social.technet.microsoft.com/wiki/contents/articles/5752.how-to-grant-users-rights-to-manage-services-start-stop-etc.aspx
Am I missing something here?