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

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.


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.