Get information on who starts program

S

Shawn

Hi.
Is it possible to get information on who starts my program? The program is
to be set to run as a service, but I also wish to create a user interface to
use when the program is started manually. So, is it possible to see if it's
being run as a service or if someone else started the program?

Thanks,
Shawn
 
K

Ken Tucker [MVP]

Hi,

Take a look at Environment.UserName and Environment.UserInteractive.

Ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top