Hello Maik, I am Henry and I want to share my insight about your issue.
Can you try to use a FirstLogonCommand in your Unattend.xml. Add the following to your unattend.xml file under the oobeSystem pass. This command will set the registry key for the wallpaper for the current user logging in for the first time.
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<Order>1</Order>
<CommandLine>reg add "HKCU\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d C:\Windows\Web\Wallpaper\MyCorp\wallpaper.jpg /f</CommandLine>
<Description>Set Custom Wallpaper</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>2</Order>
<CommandLine>RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters 1, True</CommandLine>
<Description>Refresh Desktop</Description>
</SynchronousCommand>
</FirstLogonCommands>
Another solution is to directly modify the default user registry hive.
Important: Back Up the Registry Hive Before Editing
Editing the NTUSER.DAT file is a high-risk operation. A mistake could corrupt the default user profile, which may prevent new users from being created or logging in correctly. Always make a backup first.
In Audit Mode, navigate to C:\Users\Default\ (you may need to show hidden files).
Copy the NTUSER.DAT file and paste it in the same folder.
Rename the copy to NTUSER.DAT.bak.
If anything goes wrong, you can delete your modified file and restore it from this backup.
Steps to Modify the Hive:
- Open Registry Editor: Press Win + R, type regedit, and press Enter.
- Load the Default User Hive:
- Select the HKEY_USERS branch.
- Click File > Load Hive....
- Navigate to C:\Users\Default\
- elect the NTUSER.DAT file. You may need to enable viewing of hidden files to see it.
- When prompted for a key name, enter a temporary name, for example, DefaultUser.
- Set the Wallpaper:
- Navigate to HKEY_USERS\DefaultUser\Control Panel\Desktop.
- In the right pane, find the Wallpaper string value. Double-click it and set its data to the full path of your custom wallpaper image (e.g., C:\Windows\Web\Wallpaper\MyCorp\wallpaper.jpg).
- Note: Ensure your wallpaper file is in a location that will be accessible on the final system, like C:\Windows\Web.
- Set the Theme:
- To apply a full theme, navigate to HKEY_USERS\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Themes.
- Find the CurrentTheme string value and set its data to the full path of your custom .theme file.
- Unload the Hive:
- Select the HKEY_USERS\DefaultUser key you created.
- Click File > Unload Hive....
- Confirm by clicking Yes. If you get an error, ensure you are not selected on a sub-key within your temporary hive.
Once this is done, you can proceed with your sysprep /generalize /reboot command.
I hope this helps you achieve the desired setup. Let me know how it goes, and if this answer is helpful, feel free to hit “Accept Answer” so others can benefit too.