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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.