Take the 2-minute tour ×

I am trying to extract the current user's account picture in Windows 7, but I can't seem to figure out where it is located. I have found that the picture is sometimes written to the User's temp folder, but only after performing certain actions. It isn't always guaranteed to be there. Has anyone had any luck extracting this image? Thanks!

Update: I am trying to extract the image using C++, but help in any language would be a big step. :)

share|improve this question

3 Answers 3

up vote 1 down vote accepted

It's described here under User Profile Tiles in Windows 7. It doesn't seem very encouraging.

share|improve this answer
That is what I have found as well, not encouraging. :( –  Jon Tackabury Apr 20 '10 at 19:20

Whenever an API call needs the UserTile, it is copied to %TEMP%\%USERNAME%.bmp, which is usually C:\Users\username\AppData\Local\Temp\username.bmp.

But if you need to extract it directly from SAM, you can adapt the details from http://deployment.xtremeconsulting.com/2010/06/23/usertile-automation-part-1/, to make a program to read HKLM\SAM\SAM\Domains\Account\Users\????????\UserTile (in system context!), skip 12 bytes, read 4 bytes to uint, and read that uint number of bytes into a file.

Edit: I feel I should add that the API call that Explorer in Windows XP uses to get the icon, is an unnamed address in one of the logon DLL's (hence you can not call it yourself, since that address should change between versions), I can not remember which exact DLL at the moment.

share|improve this answer

I'm not sure about how you want to extract the picture. But if you just could use windows explorer, go to C:\Users\(your-username)\AppData\Local\Temp. The image file is named as (your-username).bmp

I got this from http://www.sevenforums.com/tutorials/5187-user-account-picture-change.html. I have checked it and it worked.

share|improve this answer

Your Answer


