Forcing Windows 10 to use a specific image for a user account via command line batch file

by Chris   Last Updated May 23, 2020 01:01 AM

I have a batch file that I use when I am reinstalling Windows or setting up refurbished computers from customers. It does a couple of things, from creating an administrator account called Support with a password to modifying the computer manufacturer information to include our company name, website, phone number and the type of refurbished computer it is and our company logo.

Everything is working except one item. I want to force the newly created Support account to have a specific image tied to it. I have tried a couple of things and I can get the images (there are more than one, per Microsoft requirements), but cannot link them to the account via the command line from the batch file.

Here is the code I am using to create the administrator account and copy the images, but I cannot figure out how to link the image to the account, though I think it should with just the name. Please help.

net user  support ********* /add

net localgroup administrators support /add

COPY support.png "%ProgramData%\Microsoft\User Account Pictures\support.png" /v
COPY support-192.png "%ProgramData%\Microsfot\User Account Pictures\support-192.png" /v
COPY support-48.png "%ProgramData%\Microsoft\User Account Pictures\support.48.png" /v
COPY support-40.png "%ProgramData%\Microsoft\User Account Pictures\support-40.png" /v
COPY support-32.png "%ProgramData^&\Microsoft\User Account Pictures\support-32.png" /v

The deal is, I refurbish the computer, run the batch file to add the Support user and update the OEM information and then shut it down and send it to the customer. I am looking to see if there is a way to force the Support user image to be used, without having to further enter the registry directly before shutting down the system. If I can get it forced through from the batch file, that would be great.

Related Questions

How do I start Chrome using a specified "user profile"?

Updated November 06, 2015 07:00 AM

Delete registry key on certain condition

Updated October 19, 2017 16:01 PM

List members of a Windows group using command line

Updated October 22, 2017 19:01 PM