Home > Net >  How to obtain the operating system user login status
How to obtain the operating system user login status

Time:09-18

C # write a Windows system service, need only after the operating system user login and show the desktop perform an operation, but not too early,
How to determine whether there is any current user login and show the desktop?

Tried the Environment. The UserName is invalid, if not the login information, and for a Windows SYSTEM service, this UserName is SYSTEM forever

CodePudding user response:

Can consider to design a class or a data structure to store has user logged in, thus to judge whether the login,

CodePudding user response:

As if detecting Explore process

CodePudding user response:

I think this is what you want?
  •  Tags:  
  • C#
  • Related