How to select the account on the login screen of Windows7 by start typing the name?

All we need is an easy explanation of the problem, so here it is.

When MacOS boots up and the users is prompted to select the account (s)he wants to login into, the users can either click the name / icon of the account with the mouse or just type in the name of the account.

I want to do the same at the login screen of Windows7: Login screen pops up, I start to type my account name, I select the account with enter and then I type the password and enter again. No usage of the mouse involved.

(I am aware of tab-cycling and hard-to-follow-the-almost-invisible-marker-of-where-the-focus-is-right-now)

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

You are looking to writing a specialized Credential Provider. I an not going to write one for you, not even for 5000 reps, but I can point you in the right direction.

The article Create Custom Login Experiences With Credential Providers For Windows Vista explains the basics of Microsoft’s move away from the earlier GINA model. It develops a sample which demonstrates the new features via a hybrid credential provider that allows a user name, password, and domain name to be stored on a smart card, so that upon insertion of the card, the user is automatically logged on.

Microsoft also provides for download Credential Provider Samples, which include an overview document describing how to build them.

If you do intend to develop your Credential Provider, I suggest strongly to debug it inside a virtual machine, for obvious reasons.

Method 2

Thinking about this again, there are much easier ways to accomplish this:

  1. Option one (Confirmed): A good old trick to get a program to run on the login screen. 🙂

  2. Take ownership of and replace %WINDIR%\System32\osk.exe by the program from step 4.

  3. Go to the Ease of Access Center, Use the computer without a mouse or keyboard.

  4. Enable Use On-Screen Keyboard.

  5. Save and go back, at the left side click Change administrative settings.

  6. Click to apply the settings to the logon desktop and save.

  7. Option two (Should work): Services always run, so they can start programs on the login screen.

  8. Write a service C / C# that starts early, perhaps set it’s start type to boot in the registry.

  9. Let the service detect C / C# when winlogon.exe is started, after which it starts our program.

  10. Option three (Doesn’t seem to work): The Task Scheduler provides options for it, I have tried started based on "Startup" and on the "Winlogon WGA Event" but both didn’t succeed, perhaps I need to set another user than "System" for this to work… Alternative: Winlogon Notification DLL

  11. This allows us to run our own written program at the login screen!

    • Using SetWindowsHookEx you could create a WH_KEYBOARD hook to handle input.

      • Alternative: Create a GUI window and give that window focus.
      • Alternative 2: If you hide the users you can track the username box, see AutoItX below.
         
    • Using WMI you could enumerate all the local users.

    • Calling AutoItX functions allows you to manipulate the Windows Login Screen from your app. This will also allow us to detect if we are at the login screen by checking if explorer runs.

      AutoItWindow shows that the screen is: Class: AUTHUI.DLL: LogonUI Logon Window and the password field is named Edit1, so you can actually read the typed data.

    In this way, you should be able to run a program that listens for the characters you type, retrieve the list of accounts and when it finds a match would autocomplete the appropriate account.

    I would suggest C++ (Native) or C# (PInvokes for API calls, easy WMI) but any language might fit…

  12. Alternative:

I think it might be possible to only use a compiled AutoIt script to accomplish this task, as you can track and manipulate the username box and also enumerate WMI, which is the sole thing you need to get this working. Perhaps you need to disable the tray icon feature though…

You can use AutoIt Window Info (place it as osk.exe) to see the class names at the login screen.

Method 3

Windows Vista and Windows 7 does this out of the box (sort of) for domain logins.

This only works in editions of Windows that support domain join. You may be able to make a script that does this for you on other editions – let me know and I will look in to it.

Launch Group Policy Editor (Start > Run > gpedit.msc).

Look for Computer Config \ Windows Settings \ Security Settings \ Local Policies \ Security Options \ Interactive logon: Do not display last user name, and set this to Enabled

Next time you login, you should be able to type the username you want.

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply