How can I set a custom photo for user tile on Start Menu & Logon screen?
I'd like to set a photo of each user to be displayed as their user tile on the start menu and logon screen. I've searched online and can't seem to find a working solution for this. Here are the possibilities I've looked at so far, but come to a dead end in every case: Ideally, windows would pull the user's photo that is already stored in active directory, but that's not a requirement. Another option would be a network share with all of the photos stored as username.bmp and have windows pull the appropriate photo. Is it possible to get windows to look for %username%.bmp instead of user.bmp as the 'default' image, so that it would find a photo for each user? It looks like windows uses the c:\programdata\microsoft\user account pictures\DOMAIN+USERNAME.dat to point to the location of where that user's photo would be, but by default that data file is 0k. Is there a way to edit that dat file, or perhaps a setting somewhere buried deep in the os that would cause that file to be updated? Worst case would be that each user has to set the picture themselves, but at this point I can't even find a way to do that. In Windows 7, users can set their own tile image in the user accounts control panel, or by just double clicking on their user tile in the start menu. In 2008, the same action brings up server manager for admin users, and for non admins it just brings up an explorer window that quickly disappears. The end goal is for this to work on our terminal servers, so I don't think the couple of solutions I've found that involve coping a file over the default user.bmp file during the logon script would work with multiple users logged in at once. Has ANYONE accomplished this, and if so, how?
January 14th, 2011 11:03am

I've tried opening the domain+username.dat file in a hex editor, and I see that the path of the source file is listed at the end of the dat. That's a very small amount of data at the end of a ~30k file. Is the image contained within that data file as well? That would explain why I can delete the original source file and the user tile still displays that image.
Free Windows Admin Tool Kit Click here and download it now
January 14th, 2011 12:11pm

It looks like the .dat file does actually contain the image, as well as the original source path. I'm not sure what, if anything, else is included. I have found that if you rename a domain+username.dat file to match another username, the image does show up for the new user. Also, if you copy the domain+username.dat file from an R2 server to an R1 server, it does work. So in theory, I could change my user photo on my win7 machine, copy the dat file, change my photo back, and put the copied dat file on the terminal server with another user's name, and have the photo show up for them. Still, that's a bit too much to go through for every employee. I don't get why this isn't as simple as a checkbox setting to 'use photos from active directory' or similar. grr
January 14th, 2011 3:35pm

It looks like the .dat file does actually contain the image, as well as the original source path. I'm not sure what, if anything, else is included. I have found that if you rename a domain+username.dat file to match another username, the image does show up for the new user. Also, if you copy the domain+username.dat file from an R2 server to an R1 server, it does work. So in theory, I could change my user photo on my win7 machine, copy the dat file, change my photo back, and put the copied dat file on the terminal server with another user's name, and have the photo show up for them. Still, that's a bit too much to go through for every employee. I don't get why this isn't as simple as a checkbox setting to 'use photos from active directory' or similar. grr Edit: Okay, I did find this: http://joco.name/2010/12/06/i-discovered-the-new-windows-user-tile-api/ It doesn't automate the process like I want, but it does let me create the tiles easily enough. I should be able to create the tiles and save them in a central store, then have them copied over to each terminal server with policy preferences or as part of the logon script. It's not ideal, but it's better than nothing.
Free Windows Admin Tool Kit Click here and download it now
January 14th, 2011 3:38pm

Hi, In Windows Server 2008 R2, you can change user account picture as you do in Windows 7 via one picture available (if the picture is under the User Account Pictures\Default Pictures folder ) or clicking Browser for more pictures. If you cannot, did you receive any error? Did you configure the following policy? Computer Configuration, Administrative Templates, Control Panel, User Accounts, in the right pane "Apply the default user logon picture" For your inquiry, please refer to the following thread: http://social.technet.microsoft.com/Forums/en-US/winserverDS/thread/d32ae6c9-48e9-4913-b4ad-3c3399e89d44 Thanks. Nina This posting is provided "AS IS" with no warranties, and confers no rights.
January 20th, 2011 2:29am

Nina -- We do not have the 'apply the default user logon picture' policy enabled. Our terminal servers are 2008 R1. It appears in that version there is no way for a user to set their own picture. Unfortunately, the thread you link to doesn't seem to help. Here's what I ended up doing: This blog post I mentioned above included a link to source code for leveraging the API in win7/2008R2 to set the user tile. I don't have any knowledge of programming, but after contacting the author he was kind enough to share a tiny snippet of code that created a standalone exe for this. I called the exe I'll ask him if it's ok to share that smaller source code here, and post it later if he doesn't mind. That small program allowed me to create user tiles for any user with a single command line string. I had all the user's photos named to match their domain username, so it was easy to create a batch file to process all of them at once. I ran the batch on my win7 workstation against the existing folder of user photos. This left me with a separate DOMAIN+USER.dat file for each user, saved on my local machine under c:\programdata\microsoft\user account pictures\ I copied all of these .dat files up to a network share, and used group policy preferences to move the user's dat file from the network share to the user account pictures directory on each machine as a user logs in. Copying this dat file over to a Vista or 2008 R1 box does work, it seems the actual user tiles are the same, but there wasn't a way to create them in vista/2008R1 if you were on a domain. Below is the batch file I used to automate the process. The usertile.exe is compiled from the source code I mentioned above. There's no error catching in the program or the batch file, so if something goes wrong you have to manually move the file back out of DONE, fix whatever was wrong the first time, and rerun the batch, but it was good enough for my purposes. @set Folder=c:\usertiles\Photos for /F %%a in ('dir /b /a-d-h "%Folder%\"') do c:\usertiles\UserTile.exe DOMAIN\%%~na "%folder%\%%~na.jpg" @for /F %%a in ('dir /b /a-d-h "%Folder%\"') do copy /y "c:\programdata\microsoft\user account pictures\chc+%%~na.dat" "\\FILESERVER\SHARE\photos\" @move %folder%\*.* %folder%\done pause Edit: Here is the source code for usertile.exe: using System; using System.Runtime.InteropServices; namespace ConsoleApplication1 { class Program { [DllImport("shell32.dll", EntryPoint = "#262", CharSet = CharSet.Unicode, PreserveSig = false)] public static extern void SetUserTile(string username, int whatever, string picpath); [STAThread] static void Main(string[] args) { SetUserTile(args[0], 0, args[1]); } } } Save that block as Program.cs. And the instructions that he sent me with it: First you need the .NET framework v2 installed. You can compile it with the following command: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe Program.cs Without further parameters, this should give you a Program.exe. Then you can run it with two parameters: first, the username in machine\username or domain\username format, second, the full path name to the picture file (in double quotes if it contains spaces), like Program.exe PC102\John "c:\ProgramData\Microsoft\User Account Pictures\guest.bmp"
Free Windows Admin Tool Kit Click here and download it now
January 24th, 2011 12:28pm

Nina -- We do not have the 'apply the default user logon picture' policy enabled. Our terminal servers are 2008 R1. It appears in that version there is no way for a user to set their own picture. Unfortunately, the thread you link to doesn't seem to help. Here's what I ended up doing: This blog post I mentioned above included a link to source code for leveraging the API in win7/2008R2 to set the user tile. I don't have any knowledge of programming, but after contacting the author he was kind enough to share a tiny snippet of code that created a standalone exe for this. I called the exe I'll ask him if it's ok to share that smaller source code here, and post it later if he doesn't mind. That small program allowed me to create user tiles for any user with a single command line string. I had all the user's photos named to match their domain username, so it was easy to create a batch file to process all of them at once. I ran the batch on my win7 workstation against the existing folder of user photos. This left me with a separate DOMAIN+USER.dat file for each user, saved on my local machine under c:\programdata\microsoft\user account pictures\ I copied all of these .dat files up to a network share, and used group policy preferences to move the user's dat file from the network share to the user account pictures directory on each machine as a user logs in. Copying this dat file over to a Vista or 2008 R1 box does work, it seems the actual user tiles are the same, but there wasn't a way to create them in vista/2008R1 if you were on a domain. Below is the batch file I used to automate the process. The usertile.exe is compiled from the source code I mentioned above. There's no error catching in the program or the batch file, so if something goes wrong you have to manually move the file back out of DONE, fix whatever was wrong the first time, and rerun the batch, but it was good enough for my purposes. @set Folder=c:\usertiles\Photos for /F %%a in ('dir /b /a-d-h "%Folder%\"') do c:\usertiles\UserTile.exe DOMAIN\%%~na "%folder%\%%~na.jpg" @for /F %%a in ('dir /b /a-d-h "%Folder%\"') do copy /y "c:\programdata\microsoft\user account pictures\chc+%%~na.dat" "\\FILESERVER\SHARE\photos\" @move %folder%\*.* %folder%\done pause
January 24th, 2011 12:28pm

I think it's possible to combine netlogon script with the .net application to produce the .dat file and store it both on server and local stations. To diverse whether the script is run on the server or station, local variable %COMPUTERNAME% can be used. Variable %USERNAME%. defines the user name and %USERDOMAIN% the domain name, so it is possible to create correct name and destination path in both local computers and server. Then use the usertile.exe described by Gai-jin. to produce .dat file or there is also file format description by Joco http://joco.name/2010/12/06/i-discovered-the-new-windows-user-tile-api/ that can be used to produce the file anywhere you wish, ... I admit I have not tried it this way, but I did something much more user-like and easier to realize, though it may need bit more dull work. The server had just few user, so it was not such a problem. You set manually each user's profile picture as Your own (Settings->User account->...), then copy your .dat file in C:\Users\All Users\Microsoft\User Account Pictures and rename the copy like it was user's whom the picture was. Do this for all users and they will have the profile pictures as You set them...
Free Windows Admin Tool Kit Click here and download it now
April 18th, 2011 7:18am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics