简体   繁体   中英

Windows service and permissions problem

I have written a windows service that needs to be installed on any flavor of windows from WinXP SP2 on up (client requirement). I initially wrote the service to be started by the SCM during install, using the 'Network Service' account. All testing took place on virtual box VM's in various locations at our site, with no problems during the install, and the service running as expected.

But at the customer site, using VPC's the install of this service fails with Error 1920- a permissions error. It also fails for Virtual Box VM's- in fact it fails for pretty much -every- machine I (and my team) have tried it on but only at the customer QA site.

If the service is manually installed and a local user account is used to log on (a Workgroup account) the service starts fine- so unrealistic as this is, it at least shows the service can run, with the right log on configuration.

I set up a new user account, and went through permissions, local security policies, groups etc to make sure the account that worked and the new one matched exactly, but that new user account also could not start the service(!?). Since the account that worked is a member of a workgroup rather than a domain, I dont think there is a domain policy messing with things, but Im not 100% about that.

Any ideas on what to look for or what I could be missing?

You may want to add the login which is used for running the service to be part of Administrators Group.

Please refer to this Microsoft Support Article

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM