2

When trying to sysprep and windows 10 (1709) build I get the following error:

Package Windows.MiracastView_6.3.0.0_neutral_cw5n1h2txyewy was installed for a 
user but not provisioned for all users. This package will not function 
properly in the sysprep image.

I tried using powershell to remove it but the error message says it is part of windows and cannot be removed.

I checked the user accounts and I only have one user account (other accounts are built-in windows accounts).

How can I get sysprep to work?

After further investigation I found that miracast view is the only app where Get-AppxPackage -allusers has the pending status:

Name : Windows.MiracastView

Publisher : CN=Microsoft Windows, O=Microsoft Corporation, L=Redmond, S=Washington, C=US

Architecture : Neutral

ResourceId : neutral

Version : 6.3.0.0

PackageFullName :Windows.MiracastView_6.3.0.0_neutral_neutral_cw5n1h2txyewy

InstallLocation :

IsFramework : False

PackageFamilyName : Windows.MiracastView_cw5n1h2txyewy

PublisherId : cw5n1h2txyewy

PackageUserInformation : {S-1-5-21-4120236872-3763413694-1479318824-1000 [Operator]: Installed(pending removal)}

IsResourcePackage : False

IsBundle : False

IsDevelopmentMode : False

IsPartiallyStaged : False

SignatureKind : System

Status : Ok

JD.
  • 15,171
  • 21
  • 86
  • 159
  • 1
    Hi, I am just trying something and seems to work, ...for now. took ownership of the folder C:\Windows\System32\Sysprep\ActionFiles edited the Genralize.xml and removed the section which refers to Appx. Now the sysprep worked. I am not sure if Windows will work properly on the installed machines. – elemer82 Oct 23 '17 at 14:48
  • Excellent, I tried that on friday and it does work. However, today I found : https://developer.microsoft.com/en-us/windows/hardware/windows-assessment-deployment-kit. Trying that now..looks like there is a 1709 sysprep version that was part of the ADK which was updated on the friday. Thanks Microsoft ;( – JD. Oct 23 '17 at 15:37
  • Where can I find the sysprep tool in that ADK? I have installed the ADK , ticket all the boxes but I can't find any new sysprep.exe on my C:\ Drive. – elemer82 Oct 30 '17 at 13:39

1 Answers1

0

Okay, here is what I found and it was probably due to a lack of understanding how imaging works that caused the issue in the first place although it was only after the 1709 october release did we see the issue.

So we have VMs where we create the images. When we did the 1709 update we had left the reference image on network which downloaded some additional updates for some windows store apps. Each time we sysprep'd we kept getting failures. Removing the apps with powershell only highlighted other apps that needed to be removed. These were staged app entries and can be found as:

Get-AppXPackage -AllUser | % {if ($_.PackageUserInformation.InstallState -eq "Staged"){$_.PackageFullname}}

So, I left the reference image on the network and waited until all the staged entries disappeared (this took about 30 minutes). Rerunning the script above will not show any staged apps.

Once this was done, sysprep worked.

I think in the past, staged apps did not cause sysprep to fail but now it does.

Note that you'll see a wsappx process that runs which updates all the staged apps (view in Task manager).

Adrian
  • 42,911
  • 6
  • 107
  • 99
JD.
  • 15,171
  • 21
  • 86
  • 159