Solved sysprep problem and now I can't even log into windows now

demonguy

New Member
Messages
54
sysprep problem, metro app can't be deleted


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 log file , it shows that
Code:
2015-01-06 21:51:29, 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.
I followed this instructions in this page Removing or Updating Windows 8 built-in Windows Store apps causes Sysprep to fail. The log file still shows the same thing. Of course during this period I had run multiple times of sysprep.exe.

After execute Get-AppxPackage in powershell, i get things like this, there are plenty of apps installed by an unknown user
屏幕截图(2).png

And i can't Remove any of them, seems that i can't delete an app which is not belong to the user i curretly log in, even i'm administrator. But i really don't know what the hell is this unknown user. How could i get sysprep.exe worked?Or how can i delete this unkown user?

[DEL]After that I run "Get-AppxPackage -AllUser" and list all apps, and found that all apps are installed by "Unknown user". And now I even need provide permission to access my d e f partitions. I think maybe user account went wrong , and I'm exhausted , so I just enable administrator and delete my account. And I ran sysprep.exe again and still no love. So I reboot, and I forget sysprep.exe will disable administrator and now I'm in a very embarrassing situation , I can't log into windows because I delete my account and administrator is disabled. Even I input the right email and password I still can't log into windows. And I'm in uefi mode I can't enter safe mode either. Can anybody help?[/DEL]
 
Last edited:

My Computer

System One

  • OS
    windows 8 pro 64bit
Now I successfully log into Administrator(By relace sethc.exe of cmd.exe, and hit shift 5 times in the log screen).
But i still can't get sysprep working....
 

My Computer

System One

  • OS
    windows 8 pro 64bit
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:
Code:
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
Code:
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.

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

Note:These steps are not safe, do it on your own risk, You may only delete PackageRepository.edb in AppRepository folder to see if it works.

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).
 
Last edited:

My Computer

System One

  • OS
    windows 8 pro 64bit
Note you should really only be deleting PackageRepository.edb from the AppRepository folder. Also, this is usually caused by WU updating packages prior to sysprep (this is something it'll do if it can find a way to the internet), which is why images should be created on a network segment that ONLY has access to a WSUS server if you want to install updates. Otherwise, store apps will be updated along with the OS, which can (and sometimes does) break sysprep. This is probably why your "fix" (which is dangerous in it's own right) worked.

Just FYI. That image you've created is broken, and you should be creating a new one.
 

My Computer

System One

  • OS
    Windows 8.1 x64
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom
    CPU
    Intel Core i7 4790K @ 4.5GHz
    Motherboard
    Asus Maximus Hero VII
    Memory
    32GB DDR3
    Graphics Card(s)
    Nvidia GeForce GTX970
    Sound Card
    Realtek HD Audio
    Hard Drives
    1x Samsung 250GB SSD
    4x WD RE 2TB (RAIDZ)
    PSU
    Corsair AX760i
    Case
    Fractal Design Define R4
    Cooling
    Noctua NH-D15
I know it probably cause by updating apps from App Store, But what i want to do is just setup my hard disk to my new computer, not create a new windows image, so this is unavoidable.

May i ask what does PackageRepository.edb do? And what does other files in that folder do? Is there an official document?
 

My Computer

System One

  • OS
    windows 8 pro 64bit
May i ask what does PackageRepository.edb do? And what does other files in that folder do? Is there an official document?
Not likely, no. It's an ESE/JET database, you'll notice the .chk and .log files in there too. If you know how a JET database works (Exchange and AD) are documented somewhat), you will at least get an idea of what .edb, .chk. and .log files are and how they work together.
 

My Computer

System One

  • OS
    Windows 8.1 x64
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom
    CPU
    Intel Core i7 4790K @ 4.5GHz
    Motherboard
    Asus Maximus Hero VII
    Memory
    32GB DDR3
    Graphics Card(s)
    Nvidia GeForce GTX970
    Sound Card
    Realtek HD Audio
    Hard Drives
    1x Samsung 250GB SSD
    4x WD RE 2TB (RAIDZ)
    PSU
    Corsair AX760i
    Case
    Fractal Design Define R4
    Cooling
    Noctua NH-D15
Back
Top