Different solution for disabling networking during sysprep

garlin

Moderator
Staff member
Messages
7,468
Reaction score
3,634
Experienced users who have done sysprep, know the important rule to disable networking while in audit mode.

The reason is WU wants to update everything, including installed UWP apps, while you're working. And this results in image generalize failing, or broken user apps on first logon. A workaround is run Remove-AppxPackage before exiting audit.

Amar Honnungar has a different answer, making sysprep not touch Appx packages.
Windows: Sysprep fails with “Package xy installed for a user, but not provisioned for all users”

Remove lines from C:\Windows\System32\sysprep\Generalize.xml:
Code:
<imaging exclude="">
    <assemblyIdentity name="Microsoft-Windows-AppX-Sysprep" version="10.0.19041.1566" publicKeyToken="31bf3856ad364e35" processorArchitecture="amd64" versionScope="NonSxS"/>
    <sysprepOrder order="0x1A00"/>
    <sysprepValidate methodName="SysprepGeneralizeValidate" moduleName="$(runtime.system32)\AppxSysprep.dll"/>
    <sysprepModule methodName="SysprepGeneralize" moduleName="$(runtime.system32)\AppxSysprep.dll"/>
</imaging>

With sysprep skipping those steps, it's safe to have networking or even have WU running. Edit Generalize.xml in the mounted image, or replace it from $OEM$.
 
Thanks, if there is interest, I can split a component for AppxSysprep removal, or a Setting to just disable it.
Since that article is from 2021, maybe MS fixed it in recent Windows.

Btw post title is a bit misleading, this is not about a network, but app package auditing, or I missed the point.
 
If you asked users why the network disable rule exists, most can't explain why. They just know you follow the rule.
So using the more common description that's shared online gets you better recognition.
 
Experienced users who have done sysprep, know the important rule to disable networking while in audit mode.
in your opinion whats best, unplug the lan cable or disable the network adapter in bios? i always have the lan unplugged.
the only fails i get(sometimes) is when i capture using gimagex and it reports a file is in use by dism :/
 
Last edited:
IMO, unplugging the network right when you drop to audit mode is the simplest answer.

To disable the NIC from BIOS, this action has to be performed before booting WinPE. The side effect is Dynamic Update or anything that pulls Windows updates before reaching audit mode is blocked, and you can't re-enable it in time so OOBE has network access.

For those reasons, if the network cable is close to your arm then unplug it.
 
i would either integrate DU first or not use it at all. disabling the NIC in bios isnt a problem for me.
 
Last edited:
Back
Top