Jump to content


Image Capture Wizard Fails With Error Code (0x00004005)

Recommended Posts

Just came across the same issue on a Win 10 Build 1709 PC, had to remove the following packages via PS, then SCCM image capture completed as expected

Get-AppXPackage -Name 46928bounde.EclipseManager | Remove-AppXPackage

Get-AppXPackage -Name Duolingo-LearnLanguagesforFree | Remove-AppXPackage

Get-AppXPackage -Name Microsoft.Office.Sway | Remove-AppXPackage

Get-AppXPackage -Name Microsoft.BingNews | Remove-AppXPackage

Get-AppXPackage -Name Microsoft.NetworkSpeedTest | Remove-AppXPackage

Get-AppXPackage -Name Microsoft.BingTranslator | Remove-AppXPackage

Get-AppXPackage -Name Microsoft.RemoteDesktop | Remove-AppXPackage

Share this post

Link to post
Share on other sites

On 5/8/2017 at 12:29 PM, Albane said:

Wow, I had an account for this site already that worked...


Since I have this problem constantly with Windows 10 and always get this forum on my searches.. here are my steps to resolve it.   (Other employees build their own images, so they constantly f-up the local admin account).


1.  Run the Powershell command  'Get-AppxPackage | Remove-AppxPackage'

2.  As someone stated above, configure your registry settings for SysPrep.

  1. Open regedit and look for:

  2. HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus\CleanupState\ 
    Set to value: 2

  3. HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus\GeneralizationState\ 
    Set to value: 7

  4. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\SoftwareProtectionPlatform\SkipRearm 
    Set to value: 

  5. Then, run the command:

    msdtc -uninstall (wait a few seconds) 
    msdtc -install (wait a few seconds)

3.  From the Windows link above  (except my edits to make it work)

  1. Run the Import-Module Appx PowerShell cmdlet.
  2. Run Import-Module Dism.
  3. Run Get-AppxPackage -AllUser | Where PublisherId -eq 8wekyb3d8bbwe | Format-List -Property PackageFullName,PackageUserInformation.
  4. Delete whatever account is tied to all of your Appx packages.
  5. Reboot the computer and create a new local admin
  6. Reboot the computer and login to your new admin account.
  7. Capture the image as your new admin account.


Using these steps, I have been able to resolve all of my Windows 10 capture issues.  The final step where I capture with a clean admin account has worked every time.

The registry is missing the first entry, why would that be?



Share this post

Link to post
Share on other sites

I would like to add sth to this topic. Since version 1803 I wasn't able to delete the BuiltIn Administrator anymore, but it was needed by our CATIA Admins who built a script using the BuiltIn account.

So deleting the account that was bound to the apps preventing the WIM to be captured didn't work.

We use a VM to capture our WIMs so I checked the last DHCP lease, added a reservation for tha MAC and let our firewall admin block Internet-Access for this machine.

After doing that I enabled the BuiltIn Administrator, gave him a password and let the CATIA guys do their stuff.

Blocking access to the internet seems to prevent Windows from provisioning those nasty apps! The image could be captured without any problems.

If any problems occur with the image, I will let you know.

Share this post

Link to post
Share on other sites

I had the same problem. I did try all steps but it doesn't work. THEN I thought this problem can be about applications that I set up( forticlient, chrome, 7-zip, etc.) but it's not about them. Windows10 originally English language but I downloaded the Turkish language. I remove Turkish language package then I did Sysprep so if you have language package remove it :) 

PS: Sorry for my bad English :) 

Share this post

Link to post
Share on other sites

On 2/28/2017 at 8:17 PM, Adam Bise said:

I think this happens when you click start before running sysprep. Something about clicking start in Windows 10 seems to trigger store app installs.


Also you can fix by creating a new local user, logging in as the new local user, delete local admin profile using control panel, log in as local admin (dont click start) delete new user profile and account, run capture media.


If you are customizing an image prior to capture (and sysprep) as local administrator etc, try doing so without clicking start, or dump the local administrator profile mentioned above. Seems kind of retarded, perhaps I should have been using Audit Mode, although I read the same issue happens in that scenario as well. Anyway, you will save a little HDD space by running sysprep from a newly created profile.

Thank You !!!!  Amazing ! This saved me hours and hours of search !

Share this post

Link to post
Share on other sites

Same problem here, issue with Microsoft.OneDriveSync_21220.1024.5.0_neutral__8wekyb3d8bbwe, solved as below:

Open Command Prompt in Administrator mode: Right-click on the Windows icon in the taskbar and select Command Prompt (Admin).
Type in taskkill /f /im OneDrive.exe to terminate any OneDrive processes and hit Enter.
Then type in either:
%SystemRoot%\System32\OneDriveSetup.exe /uninstall if you’re using 32-bit Windows 10 
%SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall if you’re using 64-bit Windows 10 and hit Enter.

Then Run below command for all users:

Remove-AppXPackage -Package Microsoft.OneDriveSync_21220.1024.5.0_neutral__8wekyb3d8bbwe
Remove-AppxProvisionedPackage -Online -Package Microsoft.OneDriveSync_21220.1024.5.0_neutral__8wekyb3d8bbwe

to check and verify:
Get-AppxPackage -AllUser | Where PublisherId -eq 8wekyb3d8bbwe | Format-List -Property PackageFullName,PackageUserInformation

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...