Windows10 c # Turn on the power and do not log in. Some computers have detected a sessionLogon+sessionLock event

Linlin Bian 20 Reputation points
2023-03-24T05:53:39.95+00:00

Recently, I was developing a Windows service program using C #, and after detecting changes in computer operation, I did some processing. The problem I encountered was, Some computers trigger the sessionLogon+sessionLock event when they are only powered on and have not entered their user name and password to log in. When they log in, the sessionUnlock event is triggered again, Some computers do not trigger the above three events when they are only powered on and logged in without entering their user name and password. Until they actually log in, they will trigger the sessionLogon event, I would like to ask, what is the reason for this difference? Is it an operating system issue or a computer hardware issue? Can you adjust the settings and unify them into one situation?

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,962 questions
0 comments No comments
{count} votes

Accepted answer
  1. RLWA32 45,576 Reputation points
    2023-03-24T08:41:20.42+00:00

    By default Windows will logon the last interactive user automatically and lock the session when the system is started. This can be controlled through group policy as shown in the image below -

    AutomaticLogon

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.