Reputation: 526
Is the way to check in ServiceBase's void OnStart, void OnStop methods, who initialized action? I need username to write it into log.
Upvotes: 1
Views: 1161
Reputation: 6077
You could take the currently logged on user. (my.user.name)
Or for example use the Autolog property. This will automatically write an entry to the event log when a service is started/stopped.
Mybase.AutoLog = true
I hope this answers your question, otherwise please let me know.
Upvotes: 1