Avatar of robtheplod
robtheplod
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Windows 10 Sysprep problems

Hi

I need to to build around 40 new windows 10 pro PCs. I have carried this out with older versions of windows with no issues.

I have prepared my PC and installed the relevant software that is needed by the end users. I am at the stage where I need to sysprep the PC but I am facing issues. When carrying out sysprep is receive the following error -

sysprep-fail.jpg
From other research, I have found that this is relating to installed apps. I have been through and uninstalled these apps but i still receive the error. The logs are looking like the attached file.

Has anyone had these issues before? I need some advice on this and how to get around this issue?

Thank you.
Sysprep-Log.txt
* appsWindows 10PC

Avatar of undefined
Last Comment
robtheplod

8/22/2022 - Mon
Tahir Qureshi

Is it a clean installation or upgrade installation


as per I know Sysprep is not supposed to work on an upgraded system and thus the warning blocking sysprep from running.


Try this (My friend told me it work for him)


HKEY_LOCAL_MACHINE\system\setup

There was a key called “upgrade”, that once deleted lets you run SysPrep like normal.
Delete that key and you are good.
Set HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus to 7
Run sysprep again as Admin, It's finally work for him
Tahir Qureshi

I think I got your issue now




SYSPRP Package Microsoft.Messaging_3.19.1001.0_x86__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.

Capture.JPG
robtheplod

ASKER
Hi,

We have tried to remove the metro apps and delete the user in question, however the same error still occurs.

The user (SID 1184) has been deleted correctly but still shows up as having provisioned apps (microsoft messaging)
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Tahir Qureshi

the registry still exist

SYSPRP Failed to remove apps for the current user: 0x80073cf2.


try delete the registry
Tahir Qureshi

To resolve this issue, remove the package for the user who's running sysprep, and also remove the provisioning. To do this, follow these steps.

Note To prevent Windows Store from updating apps, unplug the Internet connection or disable Automatic Updates in Audit mode before you create the image.
Run the Import-Module Appx PowerShell cmdlet.
Run Import-Module Dism.
Run Get-AppxPackage -AllUser | Where PublisherId -eq 8wekyb3d8bbwe | Format-List -Property PackageFullName,PackageUserInformation.

Notes
In the output of this last cmdlet, check the users for whom the package is showing up as Installed. Delete these user accounts from the reference computer, or log on to the computer by using these user accounts. Then, run the cmdlet in step 4 to remove the Appx package.
This command lists all packages that were published by Microsoft and installed by any user of that reference computer. Because the computer is to be sysprepped, we assume that these user profiles no longer require the package.
If you have manually provisioned apps that belong to other publishers, run the following command to list them:

Get-AppxPackage -AllUser | Format-List -Property PackageFullName,PackageUserInformation
Run Remove-AppxPackage -Package <packagefullname>.
Remove the provisioning by running the following cmdlet:

Remove-AppxProvisionedPackage -Online -PackageName <packagefullname>
If you try to recover from an update issue, you can reprovision the app after you follow these steps.
robtheplod

ASKER
We've tried this, however it still lists packages installed for users for user profiles that do not exist. I can't find a way to remove these apps for all profiles.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Tahir Qureshi

It seems that during updates or possibly VMWARE software creates unknown user profiles on windows. Delete these profiles and sysprep will run.

Run the Import-Module Appx PowerShell cmdlet.
Run Import-Module Dism.
Run Get-AppxPackage -AllUser | Where PublisherId -eq 8wekyb3d8bbwe | Format-List -Property PackageFullName,PackageUserInformation.

Get-AppxPackage -AllUser | Format-List -Property PackageFullName,PackageUserInformation
Last command is one that will show if app is on another account.
Tahir Qureshi

can you please share the last command result
robtheplod

ASKER
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Tahir Qureshi

I have wrote a small script

Please go through and adjust the script to uninstall the application

Note To prevent Windows Store from updating apps, unplug the Internet connection or disable Automatic Updates in Audit mode before you create the image.


Import-Module AppX
Import-Module Dism
 
#You may have to manually uninstall some Sponsored Apps from the Start Menu
 
#Remove AppX Packages for non-business Apps
Get-AppxPackage *Microsoft.3DBuilder* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Getstarted* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Messaging* | Remove-AppxPackage
Get-AppxPackage *Microsoft.MicrosoftOfficeHub* | Remove-AppxPackage
Get-AppxPackage *Microsoft.MicrosoftSolitaireCollection* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Office.OneNote* | Remove-AppxPackage
Get-AppxPackage *Microsoft.People* | Remove-AppxPackage
Get-AppxPackage *Microsoft.SkypeApp* | Remove-AppxPackage
Get-AppxPackage *microsoft.windowscommunicationsapps* | Remove-AppxPackage
Get-AppxPackage *Microsoft.WindowsFeedbackHub* | Remove-AppxPackage
Get-AppxPackage *Microsoft.XboxApp* | Remove-AppxPackage
Get-AppxPackage *Microsoft.XboxIdentityProvider* | Remove-AppxPackage
Get-AppxPackage *Microsoft.ZuneMusic* | Remove-AppxPackage
Get-AppxPackage *Microsoft.ZuneVideo* | Remove-AppxPackage
 
#Remove AppX Provisioning for non-business apps
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.3DBuilder" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.Getstarted" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.Messaging" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.MicrosoftOfficeHub" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.MicrosoftSolitaireCollection" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.Office.OneNote" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.People" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.SkypeApp" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "microsoft.windowscommunicationsapps" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.WindowsFeedbackHub" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.XboxApp" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.XboxIdentityProvider" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.ZuneMusic" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.ZuneVideo" | Remove-AppxProvisionedPackage -Online

Open in new window

Tahir Qureshi

There may be some other apps  but These one I know

If you are getting simillar error (use a wild card * with Package name) and than remove

Get-AppxPackage | ? PackageFullName -like *PackageName*
Tahir Qureshi

I have found similar issue which has resolve here

https://gist.github.com/ponsfrilus/1d1c3ee5632ce6f05210c754c4d27830
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER CERTIFIED SOLUTION
aravind anche

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
robtheplod

ASKER
Thanks for your help everyone, we decided to image as is in the end as the sysprep refused to work.