Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

110698

March 16th, 2016 07:00

Windows 10 SYSPREP problems

Hello! This is my first post to this forum. I started using DIA this year as Dell advised us that future machines would need to be imaged using DIA. I successfully created a Windows 7 Enterprise image in January, and my colleague built a "lab" image as well, and uploaded both to Dell.

I also successfully built a "Version 1" or Beta build of Windows 10 Education. However, we decided we need to enable more of the privacy options by default, and I also wanted to tweak a few things, so I started trying to build a Version 2. However, I have not been successful in getting this to pass the Sysprep phase.

I started out by building on the same machine I had used for Version 1, a Latitude E6320. I figured I could just start from Version 1 and make my changes, and re-sysprep it. But I got errors like below. So I (TWICE) rebuilt the image from scratch, this time using a Parallels VM.

However this is the error I got when using the DIA capture tool with Sysprep checked:

Sysprep.exe /export "C:\Dell_PE_Folder\bcd_store_save" Failed

Error Code: 0

Please contact Microsoft for this error. Otherwise please restore an earlier version of this image and try again to run through the tools.

C:\Windows\System32\Sysprep\Panther\setuperr.log exists.

Please read that file for more detail. "C:\Windows\Panther\DTRI\LOGS\Auto_Capture_Prep_Tool.log" C:\Windows\System32\Sysprep\Panther\setuperr.log

Files listed in the above log file may need to be deleted if they exist, or removed from the Registry:

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\PnpLockdownfiles

At this point, this system is unusable. The Start menu button doesn't work, and most Run commands get the error "Device is not ready".

However, here is what is in the logs:

setuperr.log

SYSPRP Error 0x-2147216616: Failed to re-enable Compat-Gentel custom trigger.

SYSPRP setupdigetclassdevs failed with error 0

I tried searching for those errors but didn't come up with anything useful on Google.

I checked Auto_Capture_Prep_Tool.log, it's very long, but it ends in the same text as I already entered above.

And I'm unable to run regedit (Device is not ready error), and networking is disabled so I can't remote registry it either.

One note to make is that I am trying to build the image with as few Windows Store apps pre-installed as possible. I used some Powershell commands to remove unwanted apps. This is the resource I used for that: 

https://4sysops.com/archives/remove-provisioned-built-in-apps-in-windows-10/ 

Specifically the first post with a powershell script.

I also used Spybot Anti-Beacon in an attempt to privatize as much as possible. 

https://forums.spybot.info/downloads.php?id=56

Does anyone have any recommendations?

Moderator

 • 

306 Posts

May 6th, 2016 10:00

I ran into some problems this past week with updated appx packages after running Windows updates on 1511 (TH2).  Create a batch file with the following content and run before sysprepping.  Worked for me.

Echo Off
CLS
Echo Removing some Appx Packages which interfere with Sysprep
powershell -executionpolicy remotesigned Remove-AppxPackage -Package Microsoft.Appconnector_1.3.3.0_neutral__8wekyb3d8bbwe
powershell -executionpolicy remotesigned Remove-AppxPackage -Package Microsoft.People_10.0.2840.0_x64__8wekyb3d8bbwe
powershell -executionpolicy remotesigned Remove-AppxPackage -Package Microsoft.Getstarted_2.3.7.0_x64__8wekyb3d8bbwe
powershell -executionpolicy remotesigned Remove-AppxPackage -Package Microsoft.Office.OneNote_17.6131.10051.0_x64__8wekyb3d8bbwe
powershell -executionpolicy remotesigned Remove-AppxPackage -Package microsoft.windowscommunicationsapps_17.6308.42271.0_x64__8wekyb3d8bbwe
powershell -executionpolicy remotesigned Remove-AppxPackage -Package Microsoft.MicrosoftSolitaireCollection_3.3.9211.0_x64__8wekyb3d8bbwe
powershell -executionpolicy remotesigned Remove-AppxPackage -Package Microsoft.SkypeApp_3.2.1.0_x86__kzf8qxf38zg5c
:Complete

52 Posts

March 16th, 2016 07:00

Hello,

I had a very similar issue myself last week. Windows 10 is very picky when it comes to running sysprep. I also removed several built in apps on my build just to have sysprep fail. What I ended up doing is setting the autoadmin login count to 1, then run a script to call a power shell to delete the apps post sysprep. and reboot. I did have to add several delays to make sure the script completed. Hope this helps.

52 Posts

March 16th, 2016 09:00

I added a bat file to run in the runonce as below, it does a 80 second delay, then removes the apps:

@Echo off
cls
Echo "Removing built in apps, Please do not touch a key"
start /wait Powershell.exe -executionpolicy bypass  -command "c:\windows\panther\delay.ps1"
cls
Echo "Removing built in apps, Please do not touch a key"
start /wait Powershell.exe -executionpolicy bypass  -command "c:\windows\panther\app_remove.ps1"

App_remove.ps1

write-output "Removing Applications, Please do not touch a key"
Start-Sleep -s 3
Start-Sleep -s 3
Get-AppxPackage *xboxapp* | Remove-AppxPackage
Start-Sleep -s 20
Get-AppxPackage *zunemusic* | Remove-AppxPackage
Start-Sleep -s 15
Get-AppxPackage *BingWeather* | Remove-AppxPackage
Start-Sleep -s 15
Get-AppxPackage *windowsstore* | Remove-AppxPackage
Start-Sleep -s 15
Get-AppxPackage *skypeapp* | Remove-AppxPackage
Start-Sleep -s 15
Get-AppxPackage *solitairecollection* | Remove-AppxPackage
Start-Sleep -s 12
Get-AppxPackage *bingfinance* | Remove-AppxPackage
Start-Sleep -s 12
Get-AppxPackage *bingnews* | Remove-AppxPackage
Start-Sleep -s 12
Get-AppxPackage *maps* | Remove-AppxPackage
Start-Sleep -s 12
Get-AppxPackage *sway* | Remove-AppxPackage
Start-Sleep -s 12
Get-AppxPackage *zunevideo* | Remove-AppxPackage
Start-Sleep -s 12
Get-AppxPackage *bingsports* | Remove-AppxPackage
Start-Sleep -s 12
Get-AppxPackage *officehub* | Remove-AppxPackage
Start-Sleep -s 12
Get-AppxPackage *onenote* | Remove-AppxPackage
Start-Sleep -s 12
Remove-AppxprovisionedPackage -online -Packagename Microsoft.WindowsMaps_4.1509.50911.0_neutral_~_8wekyb3d8bbwe
Start-Sleep -s 2
Remove-AppxprovisionedPackage -online -Packagename Microsoft.XboxApp_2015.930.526.0_neutral_~_8wekyb3d8bbwe
Start-Sleep -s 2
Remove-AppxprovisionedPackage -online -Packagename Microsoft.ZuneMusic_2019.6.13251.0_neutral_~_8wekyb3d8bbwe
Start-Sleep -s 2
Remove-AppxprovisionedPackage -online -Packagename Microsoft.ZuneVideo_2019.6.13251.0_neutral_~_8wekyb3d8bbwe
Start-Sleep -s 2
Remove-AppxprovisionedPackage -online -Packagename Microsoft.BingWeather_4.6.169.0_neutral_~_8wekyb3d8bbwe
Start-Sleep -s 2
Remove-AppxprovisionedPackage -online -Packagename Microsoft.WindowsStore_2015.1013.14.0_neutral_~_8wekyb3d8bbwe
Start-Sleep -s 2
Remove-AppxprovisionedPackage -online -Packagename Microsoft.Office.Sway_2015.6216.20251.0_neutral_~_8wekyb3d8bbwe
Start-Sleep -s 2
Remove-AppxprovisionedPackage -online -Packagename Microsoft.Office.OneNote_2015.6131.10051.0_neutral_~_8wekyb3d8bbwe
Start-Sleep -s 2
Remove-AppxprovisionedPackage -online -Packagename Microsoft.SkypeApp_3.2.1.0_neutral_~_kzf8qxf38zg5c
Start-Sleep -s 2
Remove-AppxprovisionedPackage -online -Packagename Microsoft.MicrosoftSolitaireCollection_3.3.9211.0_neutral_~_8wekyb3d8bbwe
Start-Sleep -s 2
Remove-AppxprovisionedPackage -online -Packagename Microsoft.BingFinance_4.6.169.0_neutral_~_8wekyb3d8bbwe
Start-Sleep -s 2
Remove-AppxprovisionedPackage -online -Packagename Microsoft.BingNews_4.6.169.0_neutral_~_8wekyb3d8bbwe
Start-Sleep -s 2
Remove-AppxprovisionedPackage -online -Packagename Microsoft.BingSports_4.6.169.0_neutral_~_8wekyb3d8bbwe
Start-Sleep -s 2
Remove-AppxprovisionedPackage -online -Packagename Microsoft.MicrosoftOfficeHub_2015.6306.23501.0_neutral_~_8wekyb3d8bbwe
Start-Sleep -s 2

10 Posts

March 16th, 2016 09:00

I'll give that a shot. I already have a C:\Applications folder that contains post-install stuff. 

One question, do you know how to get a Powershell Script to run directly from explorer? In order to use the script I linked to above, I had to first open powershell, then set-executionpolicy unrestricted and then run the script, and then set it back to restricted. I'd rather not have to do that every time I image a PC!

10 Posts

March 18th, 2016 07:00

Well, I don't know what I'm doing wrong. This time I started from scratch again, installed Education 64-bit, installed Office 2016 32-bit, put in the product keys for both (Windows 10 won't even let you do your desktop theme customizations until you put in the product key!), did not install anything else other than DIA, only copied over my Applications folder to C:. 

Also this time, I did not let the VM connect to the internet for updates, and I did not open powershell for any reason, I set up the scripts like you posted above in the post-install commands in unattend.xml.

I let DIA validate, install Dell_PE and run sysprep over night. This morning, I come in and I've still got the same error message.

Very frustrating!

13 Posts

March 18th, 2016 08:00

I think it has to do with the media you are using

Try this: http://www.dell.com/support/home/us/en/04/Drivers/OSISO

10 Posts

March 18th, 2016 08:00

I'm not using a Dell image. I'm using SW_DVD5_WIN_EDU_10_1511_64BIT_English_MLF_X20-82160.ISO direct from Microsoft's VLSC.

Moderator

 • 

306 Posts

March 18th, 2016 09:00

I think jwk76 may have meant to respond to this post.

JTremblay - You mentioned that you were originally using E6320.  Did this same issue occur on the E6320, or only when you started using parallels as your build base?  I presume this means that your host machine is a Mac?  We have not tested ImageAssist in a parallels.  More information here regarding building in a VM.  Best practices for building your image in a Virtual Machine

Tyler

10 Posts

March 18th, 2016 14:00

OK, so I started over again, this time on the E6320 again. However, after working on it all day, sysprep still throws up with the same error (after chewing on generalizing for a good long time).

In order to even get sysprep to process, though, I had to run some powershell commands to remove those pesky store apps that Microsoft is shoving down our throats (Candy Crush, Twitter, etc.)

I found this resource:

https://blogs.technet.microsoft.com/mniehaus/2015/11/23/seeing-extra-apps-turn-them-off/

Basically there's a reg key you can add manually and to the unattend.xml to block these things from loading, but didn't come across this until later on in the build.

reg add HKLM\Software\Policies\Microsoft\Windows\CloudContent /v DisableWindowsConsumerFeatures /t REG_DWORD /d 1 /f

Still need help with the error I'm getting. Not sure if it's entirely related to the Windows Store or not. Why would the error be "sysprep.exe /export "c:\dell_pe_folder\bcd_store_save"? Is it exporting the bcd file? Why?

10 Posts

March 21st, 2016 09:00

OK, I finally got it to pass sysprep and capture with DIA!  I think the sticking point was the new version of DIA. I installed the same version I used back in January, and did not update it.

However, after deploying the image to another machine, I noticed that Windows' privacy options have everything defaulting to ON again (I want to make the image default to sending NOTHING to Microsoft/3rd parties)

Does anyone have a post-install script for that?

Moderator

 • 

306 Posts

March 22nd, 2018 09:00

UPDATE March 22, 2018

Yesterday I installed 1709 Pro and ran all of the latest internet posted cumulative updates. After performing the updates, the following default apps prevented Sysprep from completing. Running the below set of commands saved as a batch or command file cleaned up my reference build allowing Sysprep to complete without any errors.

CLS
Echo Removing some Appx Packages which interfere with Sysprep
powershell -executionpolicy remotesigned Remove-AppxPackage -Package 89006A2E.AutodeskSketchBook_1.7.1.0_x64__tf1gferkr813w
powershell -executionpolicy remotesigned Remove-AppxPackage -Package DolbyLaboratories.DolbyAccess_2.2.160.0_x64__rz1tebttyb220
powershell -executionpolicy remotesigned Remove-AppxPackage -Package A278AB0D.DisneyMagicKingdoms_2.8.2.3_x86__h6adky7gbf63m
powershell -executionpolicy remotesigned Remove-AppxPackage -Package Microsoft.BingNews_4.23.10572.0_x64__8wekyb3d8bbwe
powershell -executionpolicy remotesigned Remove-AppxPackage -Package king.com.BubbleWitch3Saga_4.2.2.0_x86__kgqvnymyfvs32
powershell -executionpolicy remotesigned Remove-AppxPackage -Package SpotifyAB.SpotifyMusic_1.75.483.0_x86__zpdnekdrzrea0
powershell -executionpolicy remotesigned Remove-AppxPackage -Package king.com.CandyCrushSodaSaga_1.110.600.0_x86__kgqvnymyfvs32
:Complete

 

 

1 Message

February 5th, 2019 05:00

Hi, i 'm having the same error code with image assist, after few days of headache and uses of procmon i find that sysprep get a bunch of error in registry while browsing  scheduled task .

It seems that after deleting task in microsoft\windows\application experience sysprep failed . After restoring tasks from xml sysprep and image assist are going well to the end on process.

2 Posts

April 20th, 2020 13:00

Tyler - got an update on this for going from 1809 to 1909?  Getting the Compat-Gentel error in sysprep.

1 Message

March 27th, 2023 12:00

I realize this is pretty much necroing, but I found this in a Google search, when I was trying to sysprep and it was choking on Spotify.  If you add -allusers to the Remove-AppxPackage line, it will get you passed the error when only some (in my case non-existent) user has it installed.

 

So I opened PowerShell as administrator and used the following command:

Remove-AppxPackage -AllUsers -Package SpotifyAB.SpotifyMusic_1.75.483.0_x86__zpdnekdrzrea0

After that, SysPrep ran!

No Events found!

Top