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

  • Question

  • 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]

    Friday, February 10, 2012 8:13 PM

Answers

  • 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 1, 2012 7:42 PM
    Thursday, September 27, 2012 8:49 PM

All replies

  • Maybe you need to run cmd as admin?
    Friday, February 10, 2012 9:08 PM
  • I am running CMD as administrator.
    Friday, February 10, 2012 9:10 PM
  • 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.

     

    • Marked as answer by Arthur Xie Tuesday, February 21, 2012 6:28 AM
    • Unmarked as answer by Mike__F Monday, October 1, 2012 7:44 PM
    Wednesday, February 15, 2012 9:07 AM
  • 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 1, 2012 7:42 PM
    Thursday, September 27, 2012 8:49 PM
  • Just wanna say thanks, it helps me a lot :)
    Tuesday, December 11, 2012 7:45 AM
  • Did you find a way to work with MCAFEE and DISM ?

    En exclusion within McAfee ?

    Tuesday, January 15, 2013 7:18 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.

    Monday, January 21, 2013 11:05 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
    Wednesday, March 27, 2013 10:08 AM
  • 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.

    you saved my day!

    thx

    Tuesday, October 15, 2013 2:23 PM
  • Arthur. I cannot get DISM /add-packages to work. I can /get-packages but /add fails. Do you happen to know where the .cab files live? I searched *.cab and I found no "package" .cab files on the whole system. Found lots of "package" .cat files in Windows/servicing...but...

    C. Hetkey

    Longest running Microsoft Contingent Staffer at +/_ 16 years


    profil sygnatura

    Thursday, October 17, 2013 5:00 PM
  • Arthur. I cannot get DISM /add-packages to work. I can /get-packages but /add fails. Do you happen to know where the .cab files live? I searched *.cab and I found no "package" .cab files on the whole system. Found lots of "package" .cat files in Windows/servicing...but...

    C. Hetkey

    Longest running Microsoft Contingent Staffer at +/_ 16 years


    profil sygnatura


    This could also be that the install.wim file (or other .Wim file) is locked! I copied .wim-file to other computer and succeeded doing the DISM-operations (/enable-feature and /add-driver) from that computer instead. Success!
    Thursday, April 10, 2014 6:55 AM
  • Thank you for the suggestion/ trick, this worked...:-)

    V RamaNaidu Merla

    Thursday, June 19, 2014 9:14 AM
  • Many thanks Man. This was extremely useful
    Tuesday, June 24, 2014 10:12 AM
  • This is an old thread, I know ...

    In my case, it was a combination of three different McCrappy services: 1) On Access Scanner; 2) HIPS; and 3) The McAfee Firewall. All three had to be stopped/disabled in order for the DISM command to complete successfully.



    Monday, August 4, 2014 6:22 PM
  • This is an old thread, I know ...

    In my case, it was a combination of three different McCrappy services: 1) On Access Scanner; 2) HIPS; and 3) The McAfee Firewall. All three had to be stopped/disabled in order for the DISM command to complete successfully.



    This information may well prove to be useful to many, and myself at some point if someone notices that our SCCM servers do not have AV installed because of this issue.
    Wednesday, August 20, 2014 9:30 AM
  • I've got one word for you - Thanks!
    Friday, May 27, 2016 10:03 AM
  • I get this on win10 even on a clean system (just the OS, no software, no AV).

    Anyone with a solution for win10?

    Monday, January 2, 2017 11:22 PM
  • I'm getting it while trying to add USB drivers to install.wim for a Windows 7 boot thumb drive. It worked fine for boot.wim though I did have to "force" unsigned drivers to be loaded.

    It says client may still need it open, but that should not be happening. It says System and Security are causing the problem.

    I am using Microsoft Security Essentials so it is not just a problem with McAfee.

    Anybody know how else to get around this problem?


    • Edited by DonnieR Thursday, April 27, 2017 3:29 PM
    Thursday, April 27, 2017 3:20 PM
  • I'm getting it while trying to add USB drivers to install.wim for a Windows 7 boot thumb drive. It worked fine for boot.wim though I did have to "force" unsigned drivers to be loaded.

    It says client may still need it open, but that should not be happening. It says System and Security are causing the problem.

    I am using Microsoft Security Essentials so it is not just a problem with McAfee.

    Anybody know how else to get around this problem?


    I'm having the same problem as this guy, please help!

    Wednesday, June 14, 2017 11:18 PM
  • I'm getting it while trying to add USB drivers to install.wim for a Windows 7 boot thumb drive. It worked fine for boot.wim though I did have to "force" unsigned drivers to be loaded.

    It says client may still need it open, but that should not be happening. It says System and Security are causing the problem.

    I am using Microsoft Security Essentials so it is not just a problem with McAfee.

    Anybody know how else to get around this problem?


    I'm having the same problem as this guy, please help!

    Same here.  Gotta love Microsoft "support"...
    Sunday, August 20, 2017 9:44 PM