3

From Microsoft's autologon documentation, it appears only one user can be configured to autologon on startup How to turn on automatic logon in Windows

Since the registry entry is made to HKEY_LOCAL_MACHINE and keys are named DefaultUsername and DefaultPassword, it seems only one user can be configured for autologon.

I also notice that HKEY_CURRENT_USER has a WinLogon entry but can't see a key there that can set current user's autologon.

Is there any way to configure autologon for two users that I am overlooking?

I am using Windows Server 2019.

I say Reinstate Monica
  • 25,487
  • 19
  • 95
  • 131
  • 2
    What behavior are you trying to get? – Scott - Слава Україні Apr 26 '19 at 23:11
  • It's not clear how this supposed to work. – montonero Apr 26 '19 at 23:24
  • ok let me explain more, there are two users, A and B on a windows machine. For both of them I've put different .bat script file in their respective 'startup' directory so that once they login, those script automatically run. I want both of them to be able to login to machine when the machine boots up, automatically. To do so, I used sysinternal's autologon.exe and referred above method but it can configure just 1 user at a time. How can I get both of them autologon to the machine? hope its clear now. – Praveen Tiwari Apr 27 '19 at 04:51

1 Answers1

2

You cannot have two users auto-logged using this feature in at the same time. The reason actually makes sense: The Windows auto logon functionality logs the user into the console session and only one such interactive session is possible on a computer.

If you managed to get two users to Auto logon, one of the sessions would become disconnected and inaccessible from the console. While there are certainly cases where logging in multiple non-interactive users may be desirable, this is not what the auto logon function was designed for.

Further this Auto log on functionality is the only method that exists to automatically log a full user session in (from the local machine that is). Other ways to log a user in exist, for example by executing a task as a specific user, but none of them result in a full desktop session being created.

One possible workaround would be to automatically initiate a remote desktop connection from another computer. That would successfully create a full log on session that would work alongside the built-in Auto log on functionality.

I say Reinstate Monica
  • 25,487
  • 19
  • 95
  • 131
  • Thanks very much for the detailed explanation, it makes perfect sense. I'm now thinking to setup a scheduled task or service to run the startup script for one of the user that can't autologon. – Praveen Tiwari Apr 27 '19 at 13:26