none
Servicing Win7 WIM file using DISM gives: error-0x800f082f

    问题

  • Hi All,

     

    I am trying to service a Win7 x64 bit image courtesy of the script provided by Matt

    Matt Shadbolt <https://blogs.technet.microsoft.com/configmgrdogs/2012/02/14/applying-windows-updates-to-a-base-wim-using-dism-and-powershell/>

     

    Script:

    $UpdatesPath = "G:\Win7ImageRefresh\Packages\*"

    $MountPath = “G:\Win7ImageRefresh\Offline”

    $WimFile = “G:\Win7ImageRefresh\Images\Win7Entx64_2.7.wim”

    DISM \Mount-Wim /WimFile:$WimFile /index:1 /Mountdir:$MountPath

    $UpdateArray = Get-Item $UpdatesPath

    ForEach ($Updates in $UpdateArray)

    {

    DISM /image:$MountPath /Add-Package /Packagepath:$Updates

    Start-Sleep –s 30

    }

    Write-Host "Updates included to WIM"

    DISM /Unmount-Wim /Mountdir:$MountPath /commit

    DISM /Cleanup-Wim

     

    I have downloaded all the updates as .msu files and stored it at: $UpdatesPath = "G:\Win7ImageRefresh\Packages\*"

     

    The script runs fine but on every instance of Add-Package step, it throws the following error in the PowerShell console:

     

    Processing 1 of 1 - G:\Win7ImageRefresh\Packages\windows6.1-kb4056897-x64_2af35062f69ce80c4cd6eef030eda31ca5c109ed.ms

    u: An error occurred applying the Unattend.xml file from the .msu package.

    For more information, review the log file.

     Error: 0x800f082f

    Error: 0x800f082f

    DISM failed. No operation was performed.

    For more information, review the log file.

    Any ideas? Thank you very much.

    2018年3月28日 6:07

全部回复

  • In the DISM log, the following extract gets repeated for every Add-Package step:

     

    2018-03-28 16:36:21, Error                 DISM   DISM Package Manager: PID=13900 Failed while processing command add-package. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x800f082f)

    2018-03-28 16:36:21, Error                 DISM   DISM.EXE: DISM Package Manager processed the command line but failed. HRESULT=800F082F

    2018-03-28 16:36:21, Info                  DISM   DISM Image Session: PID=13900 Disconnecting the provider store - CDISMImageSession::Final_OnDisconnect

    2018-03-28 16:36:21, Info                  DISM   DISM Provider Store: PID=13900 Finalizing the servicing provider(DISM Package Manager) - CDISMProviderStore::Internal_DisconnectProvider

    2018-03-28 16:36:21, Info                  CBS    Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}G:/Win7ImageRefresh/Offline/Windows/System32/config/SOFTWARE

    2018-03-28 16:36:21, Info                  CBS    Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}G:/Win7ImageRefresh/Offline/Windows/System32/config/SOFTWARE, the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED]

    2018-03-28 16:36:21, Info                  CBS    Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}G:/Win7ImageRefresh/Offline/Windows/System32/config/SYSTEM

    2018-03-28 16:36:21, Info                  CBS    Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}G:/Win7ImageRefresh/Offline/Windows/System32/config/SYSTEM, the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED]

    2018-03-28 16:36:21, Info                  CBS    Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}G:/Win7ImageRefresh/Offline/Windows/System32/config/SECURITY

    2018-03-28 16:36:21, Info                  CBS    Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}G:/Win7ImageRefresh/Offline/Windows/System32/config/SECURITY, the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED]

    2018-03-28 16:36:21, Info                  CBS    Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}G:/Win7ImageRefresh/Offline/Windows/System32/config/SAM

    2018-03-28 16:36:21, Info                  CBS    Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}G:/Win7ImageRefresh/Offline/Windows/System32/config/SAM, the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED]

    2018-03-28 16:36:21, Info                  CBS    Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}G:/Win7ImageRefresh/Offline/Windows/System32/config/COMPONENTS

    2018-03-28 16:36:21, Info                  CBS    Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}G:/Win7ImageRefresh/Offline/Windows/System32/config/COMPONENTS, the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED]

    2018-03-28 16:36:21, Info                  CBS    Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}G:/Win7ImageRefresh/Offline/Windows/System32/config/DEFAULT

    2018-03-28 16:36:21, Info                  CBS    Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}G:/Win7ImageRefresh/Offline/Windows/System32/config/DEFAULT, the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED]

    2018-03-28 16:36:21, Info                  CBS    Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}G:/Win7ImageRefresh/Offline/Users/default/ntuser.dat

    2018-03-28 16:36:21, Info                  CBS    Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}G:/Win7ImageRefresh/Offline/Users/default/ntuser.dat, the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED]

    2018-03-28 16:36:21, Info                  CBS    Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}G:/Win7ImageRefresh/Offline/Windows/system32/smi/store/Machine/schema.dat

    2018-03-28 16:36:21, Info                  DISM   DISM Package Manager: PID=13900 Finalizing CBS core. - CDISMPackageManager::Finalize

    2018-03-28 16:36:21, Info                  DISM   DISM Provider Store: PID=13900 Disconnecting Provider: DISM Package Manager - CDISMProviderStore::Internal_DisconnectProvider

    2018-03-28 16:36:21, Info                  DISM   DISM Provider Store: PID=13900 Found the OSServices.  Waiting to finalize it until all other providers are unloaded. - CDISMProviderStore::Final_OnDisconnect

    2018-03-28 16:36:21, Info                  DISM   DISM Provider Store: PID=13900 Finalizing the servicing provider(MsiManager) - CDISMProviderStore::Internal_DisconnectProvider

    2018-03-28 16:36:21, Info                  DISM   DISM Provider Store: PID=13900 Disconnecting Provider: MsiManager - CDISMProviderStore::Internal_DisconnectProvider

    2018-03-28 16:36:21, Info                  DISM   DISM Provider Store: PID=13900 Finalizing the servicing provider(IntlManager) - CDISMProviderStore::Internal_DisconnectProvider

    2018-03-28 16:36:21, Info                  DISM   DISM Provider Store: PID=13900 Disconnecting Provider: IntlManager - CDISMProviderStore::Internal_DisconnectProvider

    2018-03-28 16:36:21, Info                  DISM   DISM Provider Store: PID=13900 Found the PE Provider.  Waiting to finalize it until all other providers are unloaded. - CDISMProviderStore::Final_OnDisconnect

    2018-03-28 16:36:21, Info                  DISM   DISM Provider Store: PID=13900 Finalizing the servicing provider(DriverManager) - CDISMProviderStore::Internal_DisconnectProvider

    2018-03-28 16:36:21, Info                  DISM   DISM Provider Store: PID=13900 Disconnecting Provider: DriverManager - CDISMProviderStore::Internal_DisconnectProvider

    2018年3月28日 6:08
  • try the following

    $UpdatesPath = "G:\Win7ImageRefresh\Packages\*"
    
    $MountPath = "G:\Win7ImageRefresh\Offline"
    
    $WimFile = "G:\Win7ImageRefresh\Images\Win7Entx64_2.7.wim"
    
    DISM \Mount-Wim /WimFile:$WimFile /index:1 /Mountdir:$MountPath
    
    $UpdateArray = Get-Item $UpdatesPath
    
    ForEach ($Updates in $UpdateArray)
    {
    	
    	DISM /image:$MountPath /Add-Package /Packagepath:$Updates.FullName
    	
    	Start-Sleep –s 30
    	
    }
    
    Write-Host "Updates included to WIM"
    
    DISM /Unmount-Wim /Mountdir:$MountPath /commit
    
    DISM /Cleanup-Wim

    2018年3月28日 6:29
  • Hi,

    In case that the exclusive session is at a pending status,please go to the registry and change its value to 0.

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\SessionsPending

    If the problem still occurs, please help us collect the complete logs, upload to a network drive and share the link here.

    Thanks for your time.


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    2018年3月29日 6:11
  • Any updates are welcome.

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    2018年4月2日 8:57
  • Hi guys,
        I had the same issue (Slipstreaming updates into Win 7 x64) and found the reason it happened to me was because the previously injected update (in the sequence) was making changes that required reboots (pending) and so additional update injections fail.

        For me, the offending update was KB3177467

        Worth keeping in mind that any further updates that rely on this update (dependency) will not be able to be injected, just applied after the image is booted for the first time.

    Hope this helps

    • 已编辑 Psytechnic 2018年6月1日 8:08 I'm new
    • 已建议为答案 Psytechnic 2018年6月1日 8:08
    2018年6月1日 8:04