Sysprep.exe fatal error, and can't delete metro app in windows 8 to get it working

3

1

Today I used sysprep.exe to rebuild my windows image. But it always said "a fatal error occurred while trying sysprep".

Then I went to check setupact.log file , it shows like this

enter image description here

I followed this instructions in Microsoft KB article , but when i execute Get-AppxPackage -AllUser in powershell, it shows plenty of apps installed by an unknown user like this

enter image description here

I can't delete them by Remove-AppxPackage . So is there any solution to remove these apps? or just delete this unknown user once and for all?

demonguy

Posted 2015-01-06T14:33:14.137

Reputation: 307

Answers

3

I figured it out by myself. I will add some key prompts to make others easy to search.

The setupact.log file will show something like this:

Error SYSPRP Package Microsoft.Internal.Media.PlayReadyClient_2.3.1678.1_x64__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.

And When you want to delete windows 8 apps through PowerShell, It will says that apps are installed by an unknown user, which sid is S-1-5-21-XXXX. And when you execute Remove-AppxPackage in powershell, it will says

Because the current user does not have that package installed

As far as i know, Remove-AppxPackage can only remove apps belong to the user which you log in. I don't know why there is an unknown user in my OS, but here is my solution.

  • Delete all files in C:\Program Files\WindowsApps (You need to change ownership and permission of this folder by right click on it)
  • Delete all files in C:\ProgramData\Microsoft\Windows\AppRepository (You need change the ownership too).

Now when you Get-AppxPackage -allusers, it will shows nothing. Now you can run sysprep.exe and it will work well (Remember to change HKLM\SYSTEM\Setup\Status\Sysprep\SysprepStatus to 7).

demonguy

Posted 2015-01-06T14:33:14.137

Reputation: 307

1The AppRepository folder is under C:\ProgramData, not Program Files. Other than that, this has been genius! – None – 2015-06-11T21:28:58.940

0

For anyone who came here as well because of google.

The fact that the user id cant be found results in the sysprep it self. As its deleting the SID of all users, so you cant use the SID anymore to remove the app. I'm currently working with an current updated Win8.1 pro x64 from a TechnetISO and struggeling with the same shitty sysprep problem.

Resolution for me, deleting the following Apps

  • Microsoft.VCLibs.110.00_11.0.51106.1_x86__8wekyb3d8bbwe
  • Microsoft.WinJS.1.0_1.0.9200.20789_neutral__8wekyb3d8bbwe
  • Microsoft.VCLibs.110.00_11.0.51106.1_x64__8wekyb3d8bbwe
  • Microsoft.Media.PlayReadyClient_2.3.1678.0_x86__8wekyb3d8bbwe
  • Microsoft.Media.PlayReadyClient_2.3.1678.0_x64__8wekyb3d8bbwe
  • Microsoft.VCLibs.120.00.Preview_12.0.20222.1_x86__8wekyb3d8bbwe
  • Microsoft.VCLibs.120.00.Preview_12.0.20222.1_x64__8wekyb3d8bbwe

It took me hours to export and import my template, i hope i can save you some hours of try&error ;)

Sten

Posted 2015-01-06T14:33:14.137

Reputation: 1