How to fix Error Code 5 when trying to capture a reference image.

DE*CORAZON 0 Reputation points
2024-07-07T00:58:44.8+00:00

I am trying to capture a reference I created in a VM. This is the command I am putting in using WinPE. dism /capture-image /imagefile:"D:\WIN11.wim" /capturedir:D:\ /name:WIN11FULL /compress:max. I press enter.

Deployment Image Servicing and Management tool Version 10.0.22321.1

I get Error: 5 Access denied.

Has anyone run into this issue? Please assist. I am stuck right now.

Windows for business | Windows Client for IT Pros | User experience | Other
{count} votes

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Anonymous
    2024-07-08T02:06:09.59+00:00

    Hello,

    The error message "Error: 5 Access denied" typically indicates that the DISM tool doesn't have sufficient permissions to access the files or directories you're trying to use. Here are several steps you can take to troubleshoot and potentially resolve the issue:

    Run WinPE with Administrator Privileges: Ensure that you are running the Windows Preinstallation Environment (WinPE) with administrative privileges. If you're not already, try restarting WinPE as an administrator.

    Check File System Permissions: Verify the permissions on the directory where you are attempting to capture the image (). You might need to adjust the permissions to allow the system or your user account full control over the directory.

    Disable Antivirus: Temporarily disable your antivirus software. Sometimes security software can interfere with system commands.

    Good Internet Connection: Ensure that you have a stable internet connection. Some DISM operations require downloading files from Microsoft servers.

    Try running the DISM command in Safe Mode with Networking:

    • Press Windows key and type: msconfig and press Enter;
    • Click on the System Boot tab and check the options: Secure boot and network;
    • Restart the pc.

    Hope this helps.

    Best Regards,

    Hania Lian

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.