How to change default User Account picture to my custom picture in install.wim?

I've been working on this problem since last night, and I figured how to install a PNG picture for both Lock Screen and the Settings profile.

1. Download this specific build of ImageMagick (portable), and extract magick.exe

The stupid devs for ImageMagick refuse to believe their current portable version isn't portable now.
Running it throws a "VCOMP140.dll was not found" error. We need this older build which doesn't have any dependency errors.

2. Copy your PNG image as profile.png. The script will use ImageMagick to create each of the resized bitmaps.

3. From Post-Setup (Before logon), add each file one at a time. Pay attention because NTLite tries to be too smart, and will not add the right defaults for what we want.

- Add / File Change_MyProfile.ps1 with no Parameters.​
- Add / File magick.exe. Change the Type from Run to Copy.
- Add / File profile.png. Change the Type from Background to Copy.​

View attachment 12364

4. Apply changes, and create your ISO.
The script will assign the profile image to the first user account on the system (SID >= 1000).​

UPDATE: I found a PS function to perform the re-scaling, so we don't need ImageMagick now.
ok i try with this ps1
 
I've been working on this problem since last night, and I figured how to install a PNG picture for both Lock Screen and the Settings profile.

1. Download this specific build of ImageMagick (portable), and extract magick.exe

The stupid devs for ImageMagick refuse to believe their current portable version isn't portable now.
Running it throws a "VCOMP140.dll was not found" error. We need this older build which doesn't have any dependency errors.

2. Copy your PNG image as profile.png. The script will use ImageMagick to create each of the resized bitmaps.

3. From Post-Setup (Before logon), add each file one at a time. Pay attention because NTLite tries to be too smart, and will not add the right defaults for what we want.

- Add / File Change_MyProfile.ps1 with no Parameters.​
- Add / File magick.exe. Change the Type from Run to Copy.
- Add / File profile.png. Change the Type from Background to Copy.​

View attachment 12364

4. Apply changes, and create your ISO.
The script will assign the profile image to the first user account on the system (SID >= 1000).​

UPDATE: I found a PS function to perform the re-scaling, so we don't need ImageMagick now.

I can confirm its working on Windows 11 24h2, however with some Issues I think.
If I understood that right, it should only set the profile picture for the first user account which for e.x. was created by NTLite.
However the script sets the profile picture partially for all users on the machine. (see screenshots)
I only have local users right now, but in the login screen all users have the same profilepic in the left hand corner.
However only the first user account has the big profilepic in the middle of the screen above the password field.
In the logoff / change user dialog every user shows the same profilepic.

I tried to change the script via chatgpt to only do it for a certain username, however it does not work properly.
Script is attached
Any ideas for that? Or is this working by design?
 

Attachments

Unfortunately, that's by design. This was intended as a quick way to customize the Primary User's profile.

Right now I have some unfinished projects, but I'll take a look at rewriting it to handle more users.
 
That's sort of the incorrect way. I've finished rewriting my script, which needs more final testing.

There are three sets of images used to display your user account:
- Lock Screen/Logon Screen images​
- Settings & Taskbar images​
- Default user image​

Lock Screen/Logon Screen images live under "C:\Users\Public\User Account Pictures\<SID>", and must be registered under "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AccountPicture\Users\<SID>".

Settings & Taskbar images live under your "AppData\Roaming\Microsoft\Windows\AccountPictures".

The default user image lives under "C:\ProgramData\Microsoft\User Account Pictures".

If you don't have a specific Lock/Logon Screen or AppData\Roaming image, then the ProgramData image is used by Windows. For a single-user PC, that's fine. But it's not a complete solution for a system with multiple users.

View attachment 14157
 
Working on a Guest account too:
View attachment 14158
I sysprep my images so that could maybe make a difference - but should actually work on a NTLited image install for user.
 
That's sort of the incorrect way. I've finished rewriting my script, which needs more final testing.

There are three sets of images used to display your user account:
- Lock Screen/Logon Screen images​
- Settings & Taskbar images​
- Default user image​

Lock Screen/Logon Screen images live under "C:\Users\Public\User Account Pictures\<SID>", and must be registered under "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AccountPicture\Users\<SID>".

Settings & Taskbar images live under your "AppData\Roaming\Microsoft\Windows\AccountPictures".

The default user image lives under "C:\ProgramData\Microsoft\User Account Pictures".

If you don't have a specific Lock/Logon Screen or AppData\Roaming image, then the ProgramData image is used by Windows. For a single-user PC, that's fine. But it's not a complete solution for a system with multiple users.

View attachment 14157
This looks great, so you are now able to only change a specific user image?
Are all other Users on the default profile picture by windows?

Looking forward to get the script :)
 
By adding (replacing) the images in "ProgramData\Microsoft\User Account Pictures" (in the image), it's ok for the image in Settings
 
Sure, but I asked for the "WinRAR selfextracting exe"
When UserPictures is formatted correctly an put in the WinRAR.sfx i just use an ICALS cmd on the WinRAR.sfx on a mounted NTL image and chance them. They resist even on local and guest user accounts after intall.
Even a good old .desktheme file from the good old XP and 7 days i saved still change to dark theme in 10/ 11.
Isn't that odd?
But i'm happy and everything is working with no proplem.
 
Last edited:
Back
Top