1

As part of a password management tool, I am attempting to enumerate IE 10 web site usernames (i.e., auto-complete usernames) by using CredEnumerate. When I call CredEnumerate, it yields several usernames (generic usernames and domain usernames) from within the "Windows Credentials" section of the "Credential Manager", but does not include anything from the "Web Credentials" section of the Credential Manager (Control Panel\User Accounts and Family Safety\Credential Manager).

private static void Main()
{
    int count;
    IntPtr pCredentials;
    bool ret = CredEnumerate(null, 1, out count, out pCredentials);
    // ...
}

How can I get access to the Web Credentials?

Brian
  • 25,523
  • 18
  • 82
  • 173

1 Answers1

1

The simplest solution is to use the password vault, Windows.Security.Credentials.PasswordVault . Of course, this namespace is Windows 8 specific.

Brian
  • 25,523
  • 18
  • 82
  • 173
  • A must-have follow-up question here is - of course - how is it done when working with a system lower than Win8. By your reply I'm assuming that's not trivially changeable. – Konrad Viltersten Feb 11 '13 at 13:09
  • @KonradViltersten: The ugly but relatively simple solution is to write a Com DLL under Windows 8. Then, your Win7 applications can interact with it when running under windows 8. – Brian Feb 11 '13 at 13:38
  • I haven't found the proper assembly for *PasswordVault* yet... And since I'll be doing my logic from within a VSTO add-in, I'm afraid that a custom made Com DLL isn't the smoothest option, if an option at all. :( – Konrad Viltersten Feb 11 '13 at 13:53
  • @KonradViltersten: I'm not surprised you couldn't find a proper assembly. Windows 8 uses .winmd files for its api definitions, but VS2010 doesn't understand them. I'm not sure you'll encounter anything official; Microsoft tends to encourage Windows 8 developers to be running Windows 8. That said, you could, rather than using COM, just write a C wrapper (again, using VS2012 on Windows 8). – Brian Feb 11 '13 at 14:29