Set User Profile Picture with CMD

Can we set the an user profile picture from a shared folder (\\SERVER\UserPictures\%USERNAME%.jpg) via CMD? How to do that?

Thanks in advance.

June 29th, 2013 2:26am

Whats the goal?  Are you trying to set a company logo to all user profiles?  If so you can make a Group Policy change and then ensure the file "User.bmp" located at "%ProgramData%\Microsoft\User Account Pictures" is changed to the BMP of your company logo....this would affect all user pictures.

Computer Configuration\Administrative Templates\Control Panel\User Accounts\Apply the default user logon picture to all users

Free Windows Admin Tool Kit Click here and download it now
June 29th, 2013 5:58am

Whats the goal?  Are you trying to set a company logo to all user profiles?  If so you can make a Group Policy change and then ensure the file "User.bmp" located at "%ProgramData%\Microsoft\User Account Pictures" is changed to the BMP of your company logo....this would affect all user pictures.

Computer Configuration\Administrative Templates\Control Panel\User Accounts\Apply the default user logon picture to all users

June 29th, 2013 6:06am

unfortunately, I don't think you can dynamically reference a UNC path for the account picture.  If you look at where account pictures are stored, %appdata%\Roaming\Microsoft\Windows\AccountPictures, you will notice a weird file with a hex file name.  If you look at the properties of this file, you will notice that it has a specific type of Account Picture.  The file has no extension and cannot be opened by normal image editors--Photoshop won't even open it.

The information is stored in the registry under the key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\AccountPicture.  The string value SourceId contains the hex file name.  If you manually change this SourceId to a path with a .JPG, .PNG, .BMP, it won't work (at least I could not get it to work).

If you do find an answer, it would be nice to know.  I am surprised MSFT did not think to allow what you are asking; it would seem second nature to me.  However, with the path MSFT has taken as of late, I am actually not too surprised.  Good luck.

Free Windows Admin Tool Kit Click here and download it now
June 29th, 2013 9:59pm

Anyone?    A bug report at least?  Administrators need easy ways to set these things...
December 29th, 2013 9:49pm

I know in windows 7 if you make your logo a 128x128 BMP file and save it as user.bmp and guest.bmp in C:\ProgramData\Microsoft\User Account Pictures, all users that log in get the logo  

this worked for me on 100 + windows 7 pc's on a 2008 Domain

I automated the deployment to all the pc's by making a batch file, and added to my logon script, and set to only allow batch file to run once

here is the simple batch file i used to do it ..

REM set logon logo
REM by scot a dumb geek
REM  
REM  get to working directory
c:\
cd\
cd ProgramData
cd Microsoft
cd "User Account Pictures"
REM  get logo
copy \\server2008\public_share\logo.bmp
REM  back up go images
copy guest.bmp guest.bmp.og
copy user.bmp user.bmp.og
REM  remove images
del guest.bmp
del user.bmp
REM  make new images
copy logo.bmp user.bmp
copy logo.bmp guest.bmp

should work in 8, just starting to deploy 8 in the network, and will see if this works still
Free Windows Admin Tool Kit Click here and download it now
January 23rd, 2014 11:40pm

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

Other recent topics Other recent topics