Question

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. :)

Was it helpful?

Solution

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

OTHER TIPS

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.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top