Access Denied Error:5 Adding Package to .WIM with DISM

Answered Access Denied Error:5 Adding Package to .WIM with DISM

  • Friday, February 10, 2012 8:13 PM
     
     

    I am trying to add .CAB packages to a custom .wim file.  I am able to mount the image, but upon trying to add .cab packages to the image, it gives me an error like:

    ------------

    An error occurred - Package_for_KB2588516 Error:  0x80070005

    Error:  5

    Access is denied.

    -------------

    Here is a segment of the DISM.log.  I can post the full Logfile if needed.  I am running the command prompt with elevated privileges.

    -----------------

    2012-02-10 11:58:45, Info                  CBS    Failed to delete registry value: LastProgressState [HRESULT = 0x80070005 - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to delete store object value named: LastProgressState [HRESULT = 0x80070005 - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to delete registry value: LastError [HRESULT = 0x80070005 - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to delete store object value named: LastError [HRESULT = 0x80070005 - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to delete registry value: ExtendedError [HRESULT = 0x80070005 - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to delete store object value named: ExtendedError [HRESULT = 0x80070005 - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to persist status for package: Package_for_KB2588516~31bf3856ad364e35~x86~~6.1.1.1 [HRESULT = 0x80070005 - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to delete registry value: ExtendedError [HRESULT = 0x80070005 - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to delete store object value named: ExtendedError [HRESULT = 0x80070005 - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to query sources for package: Package_for_KB2588516~31bf3856ad364e35~x86~~6.1.1.1 [HRESULT = 0x80070005 - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to persist package: Package_for_KB2588516~31bf3856ad364e35~x86~~6.1.1.1. [HRESULT = 0x80070005 - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to delete registry value: LastProgressState [HRESULT = 0x80070005 - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to delete store object value named: LastProgressState [HRESULT = 0x80070005 - E_ACCESSDENIED]

All Replies

  • Friday, February 10, 2012 9:08 PM
     
     
    Maybe you need to run cmd as admin?
  • Friday, February 10, 2012 9:10 PM
     
     
    I am running CMD as administrator.
  • Wednesday, February 15, 2012 9:07 AM
     
     

    Hi,

    If you plan on using DISM to install a .cab file, it is recommended that you use the WUSA.exe tool to extract the files to a directory first.
    Make sure that the permission setting of the temp folder that save the mounted image allows the user to modify.
    Make sure that you run the command lines in a prompt window with Administrator privilege.
    If the issue persists, you’d better consider to change with another image.

    The following operating-system-package servicing options are available for a mounted offline image:
    DISM.exe /image:<path_to_mounted_image_directory> [/Get-Packages | /Get-PackageInfo | /Add-Package | /Remove-Package ] [/Get-Features | /Get- FeatureInfo | /Enable-Feature | /Disable-Feature ]

    The following operating system package servicing options are available for a running operating system:
    DISM.exe /online [/Get-Packages | /Get-PackageInfo | /Add-Package | /Remove-Package ] [/Get-Features | /Get-FeatureInfo | /Enable-Feature | /Disable- Feature ]

    Pay attention to the following please.
    1. You cannot use a network share location as a scratch directory to expand a package (.cab or .msu file) for installation. The directory used for extracting files for temporary usage during servicing must be a local directory.
    2. If subsequent actions are requested, they cannot be processed until the previous pending online action is completed.
    3. If a package is in the “installed requested” state and then you stage the package, the package state is set to “uninstall requested”. This is because it must be uninstalled before it can be staged.
    4. Some packages require other packages to be installed first. Because of this dependency requirement, you should use an answer file if you are installing multiple packages.


    Hope that helps.

     

  • Thursday, September 27, 2012 8:49 PM
     
     Answered

    I've got one word for you - McAfee!

    I experienced the same problem. After opening McAfee and disabling Access Protection and On Access Scanner it worked just fine.

    • Marked As Answer by Mike__F Monday, October 01, 2012 7:42 PM
    •  
  • Tuesday, December 11, 2012 7:45 AM
     
     
    Just wanna say thanks, it helps me a lot :)
  • Tuesday, January 15, 2013 7:18 AM
     
     

    Did you find a way to work with MCAFEE and DISM ?

    En exclusion within McAfee ?

  • Monday, January 21, 2013 11:05 AM
     
     

    We also need to know what to add as an exception.

    The problem for us appears to exist due to the network traffic scanning McAfee does.  Disabling the Access Protection and On Access Scanner does not prevent the problem occuring with our setup, but uninstalling the AV component does (so its clearly McAfee causing the issue).

    But this is only a temporary fix because the agent will force AV to install in time.

  • Wednesday, March 27, 2013 10:08 AM
     
     
    The problem for us is apparentrly not McAfee AV but McAfee DLP for some reason - Still dont know why a data leakage prevention product blocks DISM but it showed up in logs associated with that application.  McAfee put the blame for DISM related false positives squarely in Microsoft's court: https://kc.mcafee.com/corporate/index?page=content&id=KB76867&actp=search&viewlocale=en_US&searchid=1357907921573