views:

29

answers:

1

How can i restrict the behavior of a Windows service?

+3  A: 

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.

sharptooth
Then how can i associate the Windows service with that appropriate account
Pankaj
Expanded the answer.
sharptooth
Thanks Sharptooth
Pankaj