OSD Sysprep failures

Hello,
Im running into an issue with sysprep failing becuase of it not “generalizing” the image before capturing.

2024-12-31 10:56:41, Info SYSPRP ========================================================
2024-12-31 10:56:41, Info SYSPRP === Beginning of a new sysprep run ===
2024-12-31 10:56:41, Info SYSPRP ========================================================
2024-12-31 10:56:41, Info [0x0f004d] SYSPRP The time is now 2024-12-31 10:56:41
2024-12-31 10:56:41, Info [0x0f004e] SYSPRP Initialized SysPrep log at C:\Windows\system32\sysprep\Panther
2024-12-31 10:56:41, Info [0x0f0054] SYSPRP ValidatePrivileges:User has required privileges to sysprep machine
2024-12-31 10:56:41, Info [0x0f007e] SYSPRP FCreateTagFile:Tag file C:\Windows\system32\sysprep\Sysprep_succeeded.tag does not already exist, no need to delete anything
2024-12-31 10:56:41, Info [0x0f005f] SYSPRP ParseCommands:Found supported command line option ‘QUIET’
2024-12-31 10:56:41, Info [0x0f005f] SYSPRP ParseCommands:Found supported command line option ‘GENERALIZE’
2024-12-31 10:56:41, Info [0x0f005f] SYSPRP ParseCommands:Found supported command line option ‘OOBE’
2024-12-31 10:56:41, Info [0x0f005f] SYSPRP ParseCommands:Found supported command line option ‘QUIT’
2024-12-31 10:56:41, Info [0x0f005f] SYSPRP ParseCommands:Found supported command line option ‘UNATTEND’
2024-12-31 10:56:41, Info [0x0f00d7] SYSPRP WinMain:Pre-validing ‘cleanup’ internal providers.
2024-12-31 10:56:41, Info SYSPRP RunDlls:Running platform actions specified in action file for phase 3
2024-12-31 10:56:41, Info SYSPRP SysprepSession::CreateSession: Successfully created instance with action file C:\Windows\System32\Sysprep\ActionFiles\Cleanup.xml, and mode
2024-12-31 10:56:41, Info SYSPRP SysprepSession::Validate: Beginning action execution from C:\Windows\System32\Sysprep\ActionFiles\Cleanup.xml
2024-12-31 10:56:41, Info SYSPRP SysprepSession::CreateXPathForSelection: Sysprep mode in registry is
2024-12-31 10:56:41, Info SYSPRP SysprepSession::CreateXPathForSelection: Processor architecture in registry is AMD64
2024-12-31 10:56:41, Info SYSPRP ActionPlatform::LaunchModule: Executing method ‘Sysprep_Clean_Validate_Opk’ from C:\Windows\System32\spopk.dll
2024-12-31 10:56:41, Info CSI 00000001 Shim considered [l:126]‘??\C:\Windows\Servicing\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.19041.5071_none_7e3c4e707c6a2679\wcp.dll’ : got STATUS_OBJECT_PATH_NOT_FOUND
2024-12-31 10:56:41, Info CSI 00000002 Shim considered [l:123]‘??\C:\Windows\WinSxS\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.19041.5071_none_7e3c4e707c6a2679\wcp.dll’ : got STATUS_SUCCESS
2024-12-31 10:56:41, Info SYSPRP Sysprep_Clean_Validate_Opk: Successfully validated reserves state on the machine for entering audit mode.
2024-12-31 10:56:41, Info SYSPRP ActionPlatform::LaunchModule: Successfully executed ‘Sysprep_Clean_Validate_Opk’ from C:\Windows\System32\spopk.dll
2024-12-31 10:56:41, Info [0x0f00d7] SYSPRP WinMain:Pre-validing ‘generalize’ internal providers.
2024-12-31 10:56:41, Info SYSPRP RunDlls:Running platform actions specified in action file for phase 1
2024-12-31 10:56:41, Info SYSPRP SysprepSession::CreateSession: Successfully created instance with action file C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml, and mode
2024-12-31 10:56:41, Info SYSPRP SysprepSession::Validate: Beginning action execution from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml
2024-12-31 10:56:41, Info SYSPRP SysprepSession::CreateXPathForSelection: Sysprep mode in registry is
2024-12-31 10:56:41, Info SYSPRP SysprepSession::CreateXPathForSelection: Processor architecture in registry is AMD64
2024-12-31 10:56:41, Info SYSPRP ActionPlatform::LaunchModule: Executing method ‘ValidateBitLockerState’ from C:\Windows\System32\BdeSysprep.dll
2024-12-31 10:56:41, Info SYSPRP ActionPlatform::LaunchModule: Successfully executed ‘ValidateBitLockerState’ from C:\Windows\System32\BdeSysprep.dll
2024-12-31 10:56:41, Info SYSPRP ActionPlatform::LaunchModule: Executing method ‘SysprepGeneralizeValidate’ from C:\Windows\System32\AppxSysprep.dll
2024-12-31 10:56:41, Info SYSPRP Entering SysprepGeneralizeValidate (Appx) - validating whether all apps are also provisioned.
2024-12-31 10:56:41, Error SYSPRP Package Microsoft.ZuneMusic_10.19071.19011.0_x64__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
2024-12-31 10:56:41, Error SYSPRP Failed to remove apps for the current user: 0x80073cf2.
2024-12-31 10:56:41, Error SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.
2024-12-31 10:56:41, Error SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing ‘SysprepGeneralizeValidate’ from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x3cf2
2024-12-31 10:56:41, Error SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x3cf2
2024-12-31 10:56:41, Error SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x3cf2
2024-12-31 10:56:41, Error [0x0f0070] SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2
2024-12-31 10:56:41, Error [0x0f00d8] SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80073cf2
2024-12-31 10:56:41, Info [0x0f0052] SYSPRP Shutting down SysPrep log
2024-12-31 10:56:41, Info [0x0f004d] SYSPRP The time is now 2024-12-31 10:56:41

I have ran powershell to remove provisioned apps but it still fails.

Get-AppXProvisionedPackage -Online | Remove-AppxProvisionedPackage -Online

When bigfix runs SYSPREP i thought it ran the correct options to generalize?

This image is the latest Win10 22h2 December 2024 updates.

Ive tried to play whack-a-mole also and remove the provisioned packages one at a time but its a slog.

Anyone else run into this issue? Do i need to pivot away from this way of gathering deployment images? Is there a better method?

I’m not 100% certain based on the post alone but those dwRet = 0x3cf2 messages caught my eye. I’ve run into similar problems in the past and I think someone tampered with my source VM and caused the problem - but I have no proof of it. I have this article from Microsoft bookmarked and think it might help.

1 Like

oh lord, I think I know what ive done. Lol its been so long since ive done this i forgot to go into audit mode.

Reading that article triggered a core memory lol.
I didnt go into Audit mode and actually made an account on the pc instead. I bet this is why. The local user is hosing it up.

Thank you very kindly. Ill go remake it and see if that was the issue.

This link may be helpful https://4sysops.com/archives/if-sysprep-fails-fixing-sysprep-errors/#:~:text=SYSPRP%20Failed%20to%20remove%20apps%20for%20the%20current%20users%3A%200x80073cf2.&text=In%20this%20case%2C%20the%20error,uninstall%20it%20manually%20using%20PowerShell.&text=If%20you%20rerun%20Sysprep%2C%20the%20image%20will%20be%20generalized%20correctly.

In your case it looks like the Microsoft.ZuneMusic package needs to be removed manually.

1 Like

Thanks Jason. Yeah, everytime I remove one it lists another. At first it was copilot and i said of course copilot would cause issues. Then another and another.

Im pretty sure its because I didnt do it in Audit mode and used a local admin account instead before running sysprep. Redoing it in Audit mode will hopefully get around this madness.

Please do let me know whether that fixes it. I haven’t dealt with Sysprep since the Win7 day’s (my Win10 and later builds were all based on original WIM images with automatic software installs after, I stead of capturinf thick images)

1 Like

Hello,
it seems that you are having the behavior that is documented in BigFix OSD documentation at this link → Capturing Windows Images
The suggestion is to expand and use the specific form section to capture with the local user that is logged on the target computer (when it’s the same that possibly owns the updated Appx) with the option “Use a local user account”.
If this does not solve, you can also add the option to “Remove Microsoft Store Apps”.
Thanks.
Sergio
BigFix OSD L3 support

This did fix the issue Jason. Simply going into audit mode will avoid the issue all together. I have no need to capture anything from a local user so this method works better.

@sergio_tarchi thank you for the documentation. I knew it should be possible
was just being stubborn and didn’t know where to look. Thank you all for the help.

1 Like