D
D
Di-Roll2016-10-10 10:13:15
Windows
Di-Roll, 2016-10-10 10:13:15

How to get the account under which the windows service is running?

From the application being developed, I need to get the name of the account that is specified in the service:
3746da6690d5.png
Interested in how to do this in C #?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
1
15432, 2016-10-10
@15432

stackoverflow.com/questions/3141308/how-do-i-retri...

D
Dmitry Eremin, 2016-10-10
@EreminD

string name = System.Security.Principal.WindowsIdentity.GetCurrent().Name;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question