I have some windows services written in C#. When somebody stops or starts the service, I would like to be able to determine who it was and log that information.
I t
You can enable auditing according to this article
http://windowsitpro.com/systems-management/access-denied-auditing-users-who-might-be-starting-and-stopping-services
Additionally, it may be a good idea to alert email to yourself in OnStop() method.