Jump to content

Recommended Posts

Posted (edited)

I've just tried to sysprep our new Windows 10 image but getting an error. See log below.

 

Has anyone else come up against this?

2019-06-06 12:39:37, Info SYSPRP ========================================================

2019-06-06 12:39:37, Info SYSPRP === Beginning of a new sysprep run ===

2019-06-06 12:39:37, Info SYSPRP ========================================================

2019-06-06 12:39:37, Info [0x0f004d] SYSPRP The time is now 2019-06-06 12:39:37

2019-06-06 12:39:37, Info [0x0f004e] SYSPRP Initialized SysPrep log at C:\Windows\System32\Sysprep\Panther

2019-06-06 12:39:37, Info [0x0f0054] SYSPRP ValidatePrivileges:User has required privileges to sysprep machine

2019-06-06 12:39:37, Info [0x0f007e] SYSPRP FCreateTagFile:Tag file C:\Windows\System32\Sysprep\Sysprep_succeeded.tag does not already exist, no need to delete anything

2019-06-06 12:39:37, Info [0x0f003d] SYSPRP WinMain:Displaying dialog box for user to choose sysprep mode...

2019-06-06 12:39:43, Info [0x0f00d7] SYSPRP WinMain:Pre-validing 'cleanup' internal providers.

2019-06-06 12:39:43, Info SYSPRP RunDlls:Running platform actions specified in action file for phase 3

2019-06-06 12:39:43, Info SYSPRP SysprepSession::CreateSession: Successfully created instance with action file C:\Windows\System32\Sysprep\ActionFiles\Cleanup.xml, and mode

2019-06-06 12:39:43, Info SYSPRP SysprepSession::Validate: Beginning action execution from C:\Windows\System32\Sysprep\ActionFiles\Cleanup.xml

2019-06-06 12:39:43, Info SYSPRP SysprepSession::CreateXPathForSelection: Sysprep mode in registry is

2019-06-06 12:39:43, Info SYSPRP SysprepSession::CreateXPathForSelection: Processor architecture in registry is AMD64

2019-06-06 12:39:43, Info SYSPRP ActionPlatform::LaunchModule: Executing method 'Sysprep_Clean_Validate_Opk' from C:\Windows\System32\spopk.dll

2019-06-06 12:39:43, Info SYSPRP Sysprep_Clean_Validate_Opk:Sysprep will run on an upgraded OS.

2019-06-06 12:39:43, Info CSI 00000001 Shim considered [l:125]'\??\C:\WINDOWS\Servicing\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.18362.144_none_5f365e4058e531c4\wcp.dll' : got STATUS_OBJECT_PATH_NOT_FOUND

2019-06-06 12:39:43, Info CSI 00000002 Shim considered [l:122]'\??\C:\WINDOWS\WinSxS\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.18362.144_none_5f365e4058e531c4\wcp.dll' : got STATUS_SUCCESS

2019-06-06 12:39:43, Info SYSPRP Sysprep_Clean_Validate_Opk: Successfully validated reserves state on the machine for entering audit mode.

2019-06-06 12:39:43, Info SYSPRP ActionPlatform::LaunchModule: Successfully executed 'Sysprep_Clean_Validate_Opk' from C:\Windows\System32\spopk.dll without error

2019-06-06 12:39:43, Info [0x0f00d7] SYSPRP WinMain:Pre-validing 'generalize' internal providers.

2019-06-06 12:39:43, Info SYSPRP RunDlls:Running platform actions specified in action file for phase 1

2019-06-06 12:39:43, Info SYSPRP SysprepSession::CreateSession: Successfully created instance with action file C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml, and mode

2019-06-06 12:39:43, Info SYSPRP SysprepSession::Validate: Beginning action execution from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml

2019-06-06 12:39:43, Info SYSPRP SysprepSession::CreateXPathForSelection: Sysprep mode in registry is

2019-06-06 12:39:43, Info SYSPRP SysprepSession::CreateXPathForSelection: Processor architecture in registry is AMD64

2019-06-06 12:39:43, Info SYSPRP ActionPlatform::LaunchModule: Executing method 'ValidateBitLockerState' from C:\Windows\System32\BdeSysprep.dll

2019-06-06 12:39:43, Info SYSPRP ActionPlatform::LaunchModule: Successfully executed 'ValidateBitLockerState' from C:\Windows\System32\BdeSysprep.dll without error

2019-06-06 12:39:43, Info SYSPRP ActionPlatform::LaunchModule: Executing method 'SysprepGeneralizeValidate' from C:\Windows\System32\AppxSysprep.dll

2019-06-06 12:39:43, Info SYSPRP Entering SysprepGeneralizeValidate (Appx) - validating whether all apps are also provisioned.

2019-06-06 12:39:43, Error SYSPRP Package Microsoft.XboxApp_48.53.3001.0_x64__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.2019-06-06 12:39:43, Error SYSPRP Failed to remove apps for the current user: 0x80073cf2.2019-06-06 12:39:43, Error SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.2019-06-06 12:39:43, Error SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'SysprepGeneralizeValidate' from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x3cf2

2019-06-06 12:39:43, Error SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x3cf2

2019-06-06 12:39:43, Error SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x3cf2

2019-06-06 12:39:43, Error [0x0f0070] SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2

2019-06-06 12:39:43, Error [0x0f00d8] SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80073cf2

2019-06-06 12:39:51, Info [0x0f0052] SYSPRP Shutting down SysPrep log

2019-06-06 12:39:51, Info [0x0f004d] SYSPRP The time is now 2019-06-06 12:39:51

Edited by supportman
Posted

have you generated an unattend.xml file for 1903 or are you using an old one? at a guess its not liking something in the answer file

 

either that or you have removed provisioned appx files. ive never managed to capture an image after removing appx files in my experience you need to either use a script after you fire the finished image out or edit the wim file you use to deploy the machine you are going to sysprep so they dont install in the 1st place

Posted

I actually removed all the apps and then upgraded from 1809 to 1903. I'm guessing the error comes from there somewhere.

 

Tried to fix it with all kinds of powershell commands to remove or re-install the apps but no luck... :(

 

From the error it looks like the app is installed from multiple users and its getting confused, even though I have deleted all those users and just have administrator remaining.

 

Now stuck on the microsoft "Wallet" app breaking the sysprep tool. Argh...

Posted

I'd guess removal of provisioned appx too. I usually remove these at the very end just prior to sysprepping.

 

These two powershell scripts might be useful, you can highlight the packages you wish to remove using the GUI.

 

Get-AppxProvisionedPackage -online | Out-GridView -PassThru | Remove-AppxProvisionedPackage -online

 

Get-AppxPackage -AllUsers | Out-GridView -PassThru | Remove-AppxPackage

  • Thanks 1
Posted (edited)

Very cool, nice GUI that!

 

Still the same error though, I just get an error that the Microsoft 'wallet' app is not installed. Thinking I might have to setup this image again! ouch.

 

EDIT: This seems to confirm:

 

Microsoft Store apps

Installing new Microsoft Store apps or updating your existing Microsoft Store apps before generalizing a Windows image will cause Sysprep to fail. Sysprep /generalize requires that all apps are provisioned for all users; however, when you update an app from the Microsoft Store, that app becomes tied to the logged in user account. The following error appears in the Sysprep log files (located at %WINDIR%\System32\Sysprep\Panther):

 

was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.

 

Instead of using the Microsoft Store to update your apps, you should sideload updates to your line-of-business apps, provision offline-licensed Microsoft Store for Business apps for all users, or have end-users update their apps by using the Microsoft Store on their destination PCs. If Microsoft Store access in a managed environment is disabled by an IT administrator, end-users will not be able to update the Microsoft Store apps.For more information about sideloading line-of-business Microsoft Store apps, see Sideload Apps with DISM and Customize the Start Screen.

 

SOURCE: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/sysprep--generalize--a-windows-installation

Edited by supportman
Posted

I alway hate this part. I build in a VM and take a snapshot prior to Appx removal as I nearly always mess up and get too greedy removing them. Now I only remove the apps that clutter the start menu, minus the store and a few others.

 

I'm working on build 1903 now so I'm sure I will have several failed attempts!

Posted

Just a quick update.

 

I believe you need to ensure the following packages remain provisioned to enable a successful sysprep;

 

Microsoft.GetStarted

Microsoft.Wallet

Microsoft.windowscommunicationsapp

Microsoft.WindowsStore

 

I keep several other packages in my build as seen below.

 

First I run Get-AppxProvisionedPackage -online | Out-GridView -PassThru | Remove-AppxProvisionedPackage -online and remove all packages except these -

 

Microsoft.GetStarted

Microsoft.MSPaint

Microsoft.ScreenSketch

Microsoft.Wallet

Microsoft.Windows.Photos

Microsoft.WindowsCalculator

Microsoft.windowscommunicationsapp

Microsoft.WindowsSoundRecorder

Microsoft.WindowsStore

 

1.png

 

Next I run the second script Get-AppxPackage -AllUsers | Out-GridView -PassThru | Remove-AppxPackage and filter by 'store' in the GUI. I then remove all packages from all users except the packages I kept in the first step..

 

I'm left with the following packages as many are mandatory and therefore not removable.

 

2.png

 

I also have to replace the spopk.dll file in the c:\windows\system32\sysprep folder with an old one from win 10 1809 to sysprep successfully.

 

https://social.technet.microsoft.com/Forums/windows/en-US/0dcbdf32-05a1-4edc-8f22-287998d30de5/sysprep-problem-audit-mode-canamp39t-be-turned-on-if-there-is-an-active-scenario?forum=win10itprosetup

  • Thanks 1
Posted

Amazing thanks @mproffitt1983 this is the exact problem I have come up against. I don't supposed you can post the spopk.dll file can you? I don't have any 1809 machines available and was a bit reluctant to use the one from 1803.

 

Also I still have a problem disabling or removing Solitaire. No matter what I do it seems to install itself on all new users profiles. Any advice on getting rid of it?

Posted (edited)

Solitaire doesn't seem to come back on any of our builds.

 

We have several policies in place but I'm not sure which, if any of these, are the solution.

 

User Configuration | Administrative Templates | Windows Components | Store - Turn off the Store application - Enabled

 

Computer Configuration | Administrative Templates | Windows Components | App Package Deployment - Allow a Windows app to share application data between users - Disabled

 

Computer Configuration | Administrative Templates | Windows Components | App Package Deployment - Allow all trusted apps to install - Disabled

 

Computer Configuration | Administrative Templates | Windows Components | App Package Deployment - Allow deployment operations in special profiles - Disabled

 

Computer Configuration | Administrative Templates | Windows Components | App Package Deployment - Allows development of Windows Store apps and installing them from an integrated development environment (IDE) - Disabled

 

Computer Configuration | Administrative Templates | Windows Components | Cloud Content - Turn off Microsoft consumer experiences - Enabled

Edited by mproffitt1983
  • Thanks 1
Posted (edited)
I also have to replace the spopk.dll file in the c:\windows\system32\sysprep folder with an old one from win 10 1809 to sysprep successfully.

 

https://social.technet.microsoft.com/Forums/windows/en-US/0dcbdf32-05a1-4edc-8f22-287998d30de5/sysprep-problem-audit-mode-canamp39t-be-turned-on-if-there-is-an-active-scenario?forum=win10itprosetup

Several comments in the TechNet thread you linked to (including one from a Microsoft employee) mention that temporarily disabling or restricting updates also fixes the issue. Did you try this before replacing the .dll?

 

https://social.technet.microsoft.com/Forums/windows/en-US/0dcbdf32-05a1-4edc-8f22-287998d30de5/sysprep-problem-audit-mode-canamp39t-be-turned-on-if-there-is-an-active-scenario?forum=win10itprosetup

 

The Windows product team is following this thread and wanted to relay the following points

 

  • These failures means that an update from WU is currently using reserved storage. Audit mode cannot be entered while reserves are in use. More information on reserved storage is available @
     
    https://techcommunity.microsoft.com/t5/Storage-at-Microsoft/Windows-10-and-reserved-storage/ba-/428327
     
     
  • This issue should NOT be worked around by copying binaries from other OS releases
  • Restricting WU updates is a temporary way to circumvent this problem.
  • PG is reviewing this issue and will post an update as to how to better handle this issue.

 

Ran into the same sysprep error in the logs when I used MDT to capture a newly built v1903 disk image. The CU5-2019 update was already installed from applying all Windows Updates before the capture. Didn't want to resort to copying the spopk.dll file from the previous v1809 installation or make manual permissions to the existing file just yet, so I tried simply toggling the new "Pause Updates for 7 days" option before running the MDT capture sequence and MDT ran through the sysprep process and disk capturing sequence without a hitch.

 

The following article has a couple of scripts for MDT (Config-DisableWindowsStoreUpdates.wsf & Config-EnableWindowsStoreUpdates.wsf) that can disable and then re-enable Microsoft Store updates.

 

Fixing why Sysprep fails in Windows 10 due to Windows Store updates

 

When creating reference images for Windows 10, Sysprep is going to fail if the machine have Internet access, and have enough time to start updating it’s built-in applications, or install new ones as part of the consumer experience feature. This post is about preventing that from happening, and is a companion to uber-guide on building Windows 10 reference images in the real world:

 

The issue is explained in a KB from Microsoft, but it’s workaround are not very good for automation purposes.

 

QjqrEU.png zIALoU.png

 

All the scripts do is set the following two registry values...

 

Windows Registry Editor Version 5.00

; [b]Disable Consumer Experience[/b] (1 = Disabled, 2 = Enabled)
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent]
"DisableWindowsConsumerFeatures"=dword:00000001

; [b]Disable Windows Store Updates[/b] (2 = Off, 4 = On)
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate]
"AutoDownload"=dword:00000004

Edited by Arthur
  • Thanks 1
Posted
I tried disabling the updates but that didn't work for me. Looks like i'll have to copy over the spopk.dll file from 1809. It really annoys me all this nonsense with things being broken after M$ releases a new version of Windows. :mad:
Posted
I tried disabling the updates but that didn't work for me. Looks like i'll have to copy over the spopk.dll file from 1809. It really annoys me all this nonsense with things being broken after M$ releases a new version of Windows. :mad:

 

Had the spopk.dll error today have to take ownership first then I copied from 1809 machine and the machine syspreped and captured fine after that

Posted
Update on this: you no longer need to copy over the spopk.dll from 1809!! I can confirm that sysprep works after installing the latest cumulative update on 1903.
  • Thanks 2
Posted

Has anyone got stuck removing an app? Ive tried copying the dll from a 1809 PC, removing all users except default administrator, however cant remove BingWeather.

 

2019-06-13 09:20:11, Info SYSPRP Entering SysprepGeneralizeValidate (Appx) - validating whether all apps are also provisioned.​

2019-06-13 09:20:11, Error SYSPRP Package Microsoft.BingWeather_4.28.10351.0_x64__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.​​

2019-06-13 09:20:11, Error SYSPRP Failed to remove apps for the current user: 0x80073cf2.​​

2019-06-13 09:20:11, Error SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.​

 

error.jpg

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...