Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OOBE>
<HideEULAPage>true</HideEULAPage>
<NetworkLocation>Work</NetworkLocation>
<ProtectYourPC>1</ProtectYourPC>
<SkipMachineOOBE>true</SkipMachineOOBE>
<SkipUserOOBE>true</SkipUserOOBE>
</OOBE>
<!-- Uncomment the following section to set display settings
<Display>
<ColorDepth>32</ColorDepth>
<DPI>120</DPI>
<HorizontalResolution>1024</HorizontalResolution>
<RefreshRate>60</RefreshRate>
<VerticalResolution>768</VerticalResolution>
</Display>
-->
<RegisteredOwner>STI-IT</RegisteredOwner>
<RegisteredOrganization>EPFL</RegisteredOrganization>
<TimeZone>W. Europe Standard Time</TimeZone>
<CopyProfile>true</CopyProfile>
</component>
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<InputLocale>fr-CH</InputLocale>
<SystemLocale>fr-CH</SystemLocale>
<UILanguage>en-US</UILanguage>
<UserLocale>fr-CH</UserLocale>
</component>
</settings>
<settings pass="generalize">
<component name="Microsoft-Windows-PnpSysprep" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
</component>
<component name="Microsoft-Windows-Security-Licensing-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SkipRearm>1</SkipRearm>
</component>
<component name="Microsoft-Windows-Security-Licensing-SLC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SkipRearm>1</SkipRearm>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Identification>
<JoinWorkgroup>WORKGROUP</JoinWorkgroup>
</Identification>
</component>
</settings>
<cpi:offlineImage cpi:source="wim:c:/vista/x64/image.wim#Windows Vista ULTIMATE" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>
@ponsfrilus

This comment has been minimized.

Copy link
Owner Author

commented Sep 22, 2016

C:\Windows\system32\Sysprep> .\sysprep.exe /generalize /shutdown /unattend:c:\MED12315\sysprep\unattend.xml

@ponsfrilus

This comment has been minimized.

Copy link
Owner Author

commented Sep 22, 2016

2016-09-22 09:44:21, Info                  SYSPRP ========================================================
2016-09-22 09:44:21, Info                  SYSPRP ===          Beginning of a new sysprep run          ===
2016-09-22 09:44:21, Info                  SYSPRP ========================================================
2016-09-22 09:44:21, Info       [0x0f004d] SYSPRP The time is now 2016-09-22 09:44:21
2016-09-22 09:44:21, Info       [0x0f004e] SYSPRP Initialized SysPrep log at C:\Windows\system32\Sysprep\Panther
2016-09-22 09:44:21, Info       [0x0f0054] SYSPRP ValidateUser:User has required privileges to sysprep machine
2016-09-22 09:44:21, Info       [0x0f007e] SYSPRP FCreateTagFile:Tag file C:\Windows\system32\Sysprep\Sysprep_succeeded.tag does not already exist, no need to delete anything
2016-09-22 09:44:21, Info       [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'OOBE'
2016-09-22 09:44:21, Info       [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'GENERALIZE'
2016-09-22 09:44:21, Info       [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'REBOOT'
2016-09-22 09:44:21, Info       [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'UNATTEND'
2016-09-22 09:44:21, Info       [0x0f00d7] SYSPRP WinMain:Pre-validing 'cleanup' internal providers.
2016-09-22 09:44:21, Info                  SYSPRP RunExternalDlls:Running platform actions specified in action file for phase 3
2016-09-22 09:44:21, Info       [0x0f00ba] SYSPRP SysprepSession::CreateSession: Successfully created instance with mount path C:, action file C:\Windows\System32\Sysprep\ActionFiles\Cleanup.xml, and mode <null>
2016-09-22 09:44:21, Info                  SYSPRP SysprepSession::Validate: Beginning action execution from C:\Windows\System32\Sysprep\ActionFiles\Cleanup.xml
2016-09-22 09:44:21, Info                  SYSPRP ActionPlatform::GetStringValue: Getting REG_SZ value SysprepMode under key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Setup\Sysprep
2016-09-22 09:44:21, Info                  SYSPRP ActionPlatform::GetValue: Getting value SysprepMode under key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Setup\Sysprep
2016-09-22 09:44:21, Warning               SYSPRP ActionPlatform::GetValue: Error from RegQueryValueEx on value SysprepMode under key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Setup\Sysprep; dwRet = 0x2
2016-09-22 09:44:21, Info                  SYSPRP SysprepSession::CreateXPathForSelection: Sysprep mode in registry is <null>
2016-09-22 09:44:21, Info                  SYSPRP ActionPlatform::GetStringValue: Getting REG_SZ value PROCESSOR_ARCHITECTURE under key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
2016-09-22 09:44:21, Info                  SYSPRP ActionPlatform::GetValue: Getting value PROCESSOR_ARCHITECTURE under key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
2016-09-22 09:44:21, Info                  SYSPRP SysprepSession::CreateXPathForSelection: Processor architecture in registry is AMD64
2016-09-22 09:44:21, Info       [0x0f0080] SYSPRP ActionPlatform::LaunchModule: Found 'Sysprep_Clean_Validate_Opk' in C:\Windows\System32\spopk.dll; executing it
2016-09-22 09:44:21, Info       [0x0f0081] SYSPRP ActionPlatform::LaunchModule: Successfully executed 'Sysprep_Clean_Validate_Opk' from C:\Windows\System32\spopk.dll without error
2016-09-22 09:44:21, Info       [0x0f00d7] SYSPRP WinMain:Pre-validing 'generalize' internal providers.
2016-09-22 09:44:21, Info                  SYSPRP RunExternalDlls:Running platform actions specified in action file for phase 1
2016-09-22 09:44:21, Info       [0x0f00ba] SYSPRP SysprepSession::CreateSession: Successfully created instance with mount path C:, action file C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml, and mode <null>
2016-09-22 09:44:21, Info                  SYSPRP SysprepSession::Validate: Beginning action execution from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml
2016-09-22 09:44:21, Info                  SYSPRP ActionPlatform::GetStringValue: Getting REG_SZ value SysprepMode under key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Setup\Sysprep
2016-09-22 09:44:21, Info                  SYSPRP ActionPlatform::GetValue: Getting value SysprepMode under key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Setup\Sysprep
2016-09-22 09:44:21, Warning               SYSPRP ActionPlatform::GetValue: Error from RegQueryValueEx on value SysprepMode under key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Setup\Sysprep; dwRet = 0x2
2016-09-22 09:44:21, Info                  SYSPRP SysprepSession::CreateXPathForSelection: Sysprep mode in registry is <null>
2016-09-22 09:44:21, Info                  SYSPRP ActionPlatform::GetStringValue: Getting REG_SZ value PROCESSOR_ARCHITECTURE under key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
2016-09-22 09:44:21, Info                  SYSPRP ActionPlatform::GetValue: Getting value PROCESSOR_ARCHITECTURE under key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
2016-09-22 09:44:21, Info                  SYSPRP SysprepSession::CreateXPathForSelection: Processor architecture in registry is AMD64
2016-09-22 09:44:21, Info       [0x0f0080] SYSPRP ActionPlatform::LaunchModule: Found 'SysprepGeneralizeValidate' in C:\Windows\System32\AppxSysprep.dll; executing it
2016-09-22 09:44:21, Info                  SYSPRP Entering SysprepGeneralizeValidate (Appx) - validating whether all apps are also provisioned.

2016-09-22 09:44:21, Error                 SYSPRP Failed to remove apps for the current user: 0x80070005.

2016-09-22 09:44:21, Error                 SYSPRP Exit code of RemoveAllApps thread was 0x5.

2016-09-22 09:44:21, Error      [0x0f0082] SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'SysprepGeneralizeValidate' from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x5
2016-09-22 09:44:21, Error                 SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x5
2016-09-22 09:44:21, Error                 SYSPRP RunPlatformActions:Failed while validating SysprepSession actions; dwRet = 0x5
2016-09-22 09:44:21, Error      [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x5
2016-09-22 09:44:21, Error      [0x0f00d8] SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80070005
@ponsfrilus

This comment has been minimized.

Copy link
Owner Author

commented Sep 22, 2016

From https://support.microsoft.com/en-us/kb/2769827

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.

Note The issue does not occur if you are servicing an offline image. In that scenario, the provisioning is automatically cleared for all users. This includes the user who runs the command.

OR Try: http://serverfault.com/questions/758095/sysprep-windows-10-pro-error-0x0f0070-0x0f00d8

@ponsfrilus

This comment has been minimized.

Copy link
Owner Author

commented Sep 22, 2016

... check the users for whom the package is showing up as Installed. Delete these user accounts from the reference computer ...

PS C:\Windows\System32\Sysprep> Get-AppxPackage -AllUser | Where PublisherId -eq 8wekyb3d8bbwe | Format-List -Property PackageFullName,PackageUserInformation


PackageFullName        : Microsoft.MicrosoftEdge_38.14393.0.0_neutral__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1004 [admin2]: Installed, S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed, S-1-5-21-541768095-3738600148-3601236611-500 [Administrator]: Installed}

PackageFullName        : Microsoft.3DBuilder_11.1.9.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

PackageFullName        : Microsoft.Advertising.Xaml_10.0.1606.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed}

PackageFullName        : Microsoft.Advertising.Xaml_10.0.1606.0_x86__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed}

PackageFullName        : Microsoft.BingWeather_4.13.47.0_x86__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-500 [Administrator]: Installed}

PackageFullName        : Microsoft.DesktopAppInstaller_1.0.2181.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-500 [Administrator]: Installed}

PackageFullName        : Microsoft.Getstarted_4.0.12.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-500 [Administrator]: Installed}

PackageFullName        : Microsoft.Messaging_3.19.1001.0_x86__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed}

PackageFullName        : Microsoft.MicrosoftOfficeHub_17.7319.23511.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed}

PackageFullName        : Microsoft.MicrosoftSolitaireCollection_3.12.8312.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed}

PackageFullName        : Microsoft.MicrosoftStickyNotes_1.1.30.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

PackageFullName        : Microsoft.NET.Native.Framework.1.3_1.3.24201.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1004 [admin2]: Installed, S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed, S-1-5-21-541768095-3738600148-3601236611-500 [Administrator]: Installed}

PackageFullName        : Microsoft.NET.Native.Framework.1.3_1.3.24201.0_x86__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1004 [admin2]: Installed, S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed, S-1-5-21-541768095-3738600148-3601236611-500 [Administrator]: Installed}

PackageFullName        : Microsoft.NET.Native.Runtime.1.3_1.3.23901.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1004 [admin2]: Installed, S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed, S-1-5-21-541768095-3738600148-3601236611-500 [Administrator]: Installed}

PackageFullName        : Microsoft.NET.Native.Runtime.1.3_1.3.23901.0_x86__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1004 [admin2]: Installed, S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed, S-1-5-21-541768095-3738600148-3601236611-500 [Administrator]: Installed}

PackageFullName        : Microsoft.NET.Native.Runtime.1.4_1.4.24201.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

PackageFullName        : Microsoft.NET.Native.Runtime.1.4_1.4.24201.0_x86__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

PackageFullName        : Microsoft.Office.OneNote_17.7341.57791.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed}

PackageFullName        : Microsoft.OneConnect_1.1607.6.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed}

PackageFullName        : Microsoft.People_10.0.11902.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed}

PackageFullName        : Microsoft.StorePurchaseApp_1.0.45.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed}

PackageFullName        : Microsoft.VCLibs.140.00_14.0.24123.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1004 [admin2]: Installed, S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed, S-1-5-21-541768095-3738600148-3601236611-500 [Administrator]: Installed}

PackageFullName        : Microsoft.VCLibs.140.00_14.0.24123.0_x86__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1004 [admin2]: Installed, S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed, S-1-5-21-541768095-3738600148-3601236611-500 [Administrator]: Installed}

PackageFullName        : Microsoft.Windows.Photos_16.722.10060.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1004 [admin2]: Installed, S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed, S-1-5-21-541768095-3738600148-3601236611-500 [Administrator]: Installed}

PackageFullName        : Microsoft.WindowsAlarms_10.1608.2312.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed}

PackageFullName        : Microsoft.WindowsCalculator_10.1608.2213.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}

PackageFullName        : Microsoft.WindowsCamera_2016.816.20.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1004 [admin2]: Installed, S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed, S-1-5-21-541768095-3738600148-3601236611-500 [Administrator]: Installed}

PackageFullName        : microsoft.windowscommunicationsapps_17.7167.40727.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1004 [admin2]: Installed, S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed, S-1-5-21-541768095-3738600148-3601236611-500 [Administrator]: Installed}

PackageFullName        : Microsoft.WindowsFeedbackHub_1.6.2221.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1004 [admin2]: Installed, S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed, S-1-5-21-541768095-3738600148-3601236611-500 [Administrator]: Installed}

PackageFullName        : Microsoft.WindowsMaps_5.1608.2311.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed}

PackageFullName        : Microsoft.WindowsSoundRecorder_10.1608.2211.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed}

PackageFullName        : Microsoft.WindowsStore_11608.1001.41.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1004 [admin2]: Installed, S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed, S-1-5-21-541768095-3738600148-3601236611-500 [Administrator]: Installed}

PackageFullName        : Microsoft.XboxApp_19.21.9012.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1004 [admin2]: Installed, S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed, S-1-5-21-541768095-3738600148-3601236611-500 [Administrator]: Installed}

PackageFullName        : Microsoft.XboxIdentityProvider_11.19.19003.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-500 [Administrator]: Installed}

PackageFullName        : Microsoft.ZuneMusic_3.6.23981.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1004 [admin2]: Installed, S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed, S-1-5-21-541768095-3738600148-3601236611-500 [Administrator]: Installed}

PackageFullName        : Microsoft.ZuneVideo_3.6.23941.0_x64__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-541768095-3738600148-3601236611-1001 [admin]: Installed}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.