Answered by:
DISM problem: Getting Access Denied when trying to add packages to my WIM

Question
-
I am facing a problem when trying to add optional component to a WinPE image using ADK 8.1.
I'm issuing the following command inside the command prompt of "Deployment and Imaging Tools Environment" running as an administrator. I also disabled my McAffee "Access Protection" which was advised in this forum.
I also installed Process Monitor and monitored the Dism app. Please find a link to capture file below.
Please Advise!
C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools>Dism /Add-Package /Image:"C:\WinPE_amd64\mount" /PackagePath:"C:\Program Files (x86)\Windows
Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-HTA.cab"Image Version: 6.3.9600.16384
Processing 1 of 1 - Adding package WinPE-HTA-Package~31bf3856ad364e35~amd64~~6.3.9600.16384
[===========================64.3%===== ]
An error occurred - WinPE-HTA-Package Error: 0x80070005
Error: 5
Access is denied.
The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.loghttps://onedrive.live.com/redir?resid=99644B2EEF904EEA!133&authkey=!AJVm0kokLbZFGFE&ithint=file%2clog
And the Process Monitor capture file:
https://onedrive.live.com/redir?resid=99644B2EEF904EEA!135&authkey=!ABahkTsMT_hD9ls&ithint=file%2cPML
Another input I would like to add.
I''m running Windows 7 64bit.
I've succeeded to run this command successfully on VM running Windows 7 32bit.
I'm suspecting the problem is related with a problem of emulating 32bit application (ADK) on 64bit OS.
- Edited by Dudi72 Thursday, April 30, 2015 11:53 AM
Tuesday, April 28, 2015 4:16 PM
Answers
-
It appears to be the problem was indeed with the McAfee antivirus.
It changed the security policy. so even if I disabled it totally, it still blocked the DISM command.
The solution was to install Update 5 for McAfee antivirus.
Now all works fine.
Thanks you guys for the help!
- Marked as answer by Deason Wu Monday, August 24, 2015 1:06 AM
Sunday, August 23, 2015 6:38 AM
All replies
-
Dudi
On Googling that appears to still be a McAfee issue https://kc.mcafee.com/corporate/index?page=content&id=KB76867
The description in the above link matches almost perfectly to your issue. Are you sure McAfee was completely disabled?
Wanikiya and Dyami--Team Zigzag
Tuesday, April 28, 2015 4:44 PM -
Yes. I'm pretty sure. Here a screenshot.
- Edited by Dudi72 Tuesday, April 28, 2015 4:53 PM
Tuesday, April 28, 2015 4:45 PM -
Hi,
I checked your PML file and all errors ended with “FILE LOCKED WITH ONLY READERS” to some DLL files to your system which indicates that the file was locked and all users of the file can only read. It is common protection provided by Anti-virus real time scanning, it might prevent changes from being committed when using DISM or ImageX. If you are using any third party Anti-virus, please temporary disable it and check the issue again after restart.
And also ensure that you had taken the ownership of the mounted folder and didn’t apply any special NTFS permission or “Read-only” to system files or C partition.
Regards,
D. Wu
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.
- Proposed as answer by MeipoXuMicrosoft contingent staff Monday, May 11, 2015 8:46 AM
Friday, May 1, 2015 1:48 AM -
Hi Guys
Sorry for the late response.
I've totally disabled my Anti-Virus software, but I'm still facing the same problem!
I suspect it got to do with the Group Security Policy my user belongs to.
Any idea how I can confirm or contradict this assumption?
Many thanks,
Dudi.
- Edited by Dudi72 Monday, May 11, 2015 3:54 PM
Monday, May 11, 2015 3:53 PM -
Hi,
You could verify Your Policy Settings by running rosp.msc from start menu
What Is Resultant Set of Policy?
https://technet.microsoft.com/en-us/library/cc758010(v=ws.10).aspx
It should be a permission issue, make sure you run the Windows AIK/ADK Command Prompt as Administrator in order to perform these actions. Some users reported that they had to take ownership of the file repository folder in the mounted WIM to resolve this kind issue.
Regards,
D. Wu
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.
- Proposed as answer by Michael_LS Wednesday, August 19, 2015 12:57 AM
Thursday, May 14, 2015 9:09 AM -
It appears to be the problem was indeed with the McAfee antivirus.
It changed the security policy. so even if I disabled it totally, it still blocked the DISM command.
The solution was to install Update 5 for McAfee antivirus.
Now all works fine.
Thanks you guys for the help!
- Marked as answer by Deason Wu Monday, August 24, 2015 1:06 AM
Sunday, August 23, 2015 6:38 AM