How can i r开发者_StackOverflowestrict the behavior of a Windows service?
Run the service under an appropriate account. The service is nothing special - just a program that can be started without anyone logging in interactively. Its priviledges are only determined by the user account it is run under.
In service properties open the "Log On" tab and change the "Log on as:" radio button to "This account", then provide the username and password. The change will come into effect when you restart the service.
精彩评论