Sysprep system with application provisioning

patrick-x13

Member
Joined
Apr 28, 2020
Posts
12
Location
Italy
Hi,

I'm trying to sysprep a system while using Audit mode to install applications provisioned for all users. This is not working correctly as I run .exe /allusers but the installed package is still preventing the sysprep to start.
I also have a strange error while running Notepad (filesystem error)
I'm wondering if someone can help me resolve the issue.

Thank you in advance
 
I've recently used audit mode to build a windows 11 image for deployment through MDT so have a bit of experience with this. I took various notes and wrote myself instructions for next time I re-visit it.
Can you provide some more info as to the issues you have?
 
I just found the info I noted about resolving problems when sysprep fails due to some appx packages.
One particular app I found that was blocking me was MicrosoftWindows.Client.WebExperience_524.23700.10.0_x64__cw5n1h2txyewy

The solution was to open Powershell as Admin and then remove the AppxPackage with the following command;
Code:
Remove-AppxPackage -Package <packagefullname>

example
Code:
Remove-AppxPackage -Package MicrosoftWindows.Client.WebExperience_524.23700.10.0_x64__cw5n1h2txyewy

Which removed the offending package and allowed me to run SysPrep successfully.

Sometimes you need to run the following command to remove the provisioning too, so I run both for each package as it can't hurt;
Code:
Remove-AppxProvisionedPackage -Online -PackageName <packagefullname>

example
Code:
Remove-AppxProvisionedPackage -Online -PackageName MicrosoftWindows.Client.WebExperience_524.23700.10.0_x64__cw5n1h2txyewy

I also found that installing windows updates in audit mode to be useful as this didn't break sysprep.
I wrote a powershell script for it but the manual steps are as follows;

Open a Powershell window as Administrator then run the following commands.
Install-Module -Name PSWindowsUpdate
PowerShell -ExecutionPolicy RemoteSigned -Command Import-Module PSWindowsUpdate;
Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -AutoReboot
Get-WindowsUpdate

The 4th command above checks if any there are any remaining updates available. If there are, then you may need to repeat the 3rd and 4th again. If updates fail then reboot and repeat steps 2, 3 and 4 again.
Repeat until step 4 shows no updates available.

I also found the image capturing process to work best when using a WinPE bootdisk after sysprep;
Boot the build PC to the WinPE ISO and from the WinPE x64 environment, capture the WIM image using the following command;
example
Dism /Capture-Image /ImageFile:"D:\Golden.wim" /CaptureDir:C:\ /Name:Golden
 

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top