Alex Rivera | Logout

Getting user name/password of the logged in user in Windows

Asked 2008-09-22T07:18:49.970
10

Is there any API to get the currently logged in user's name and password in Windows?

Thank you in advance.

Edit
Report

1 Answer

2

GetUserName will get you the name, but the password you can't get. It's not even something Windows stores, AFAIK - only a hash of your password.

Depending on what you're trying to achieve (you can tell us a bit more..) it's possible to impersonate a logged on user and do stuff on his/her behalf.

answered 2008-09-22T07:22:01.427

Your Answer