大网数据广告活动
启动与系统组件

DISM /Apply-Image command fails with error code 5 (ERROR_ACCESS_DENIED)

· 52CE 我爱测

Works around an issue that causes the DISM apply image command to fail with error code 5 (ERROR_ACCESS_DENIED). Occurs when you try to apply a Windows 10 1607 image by using the Windows Subsystem for Linux (WSL) feature.

This article provides a workaround for an issue where DISM /Apply-Image command fails with error code 5 (ERROR_ACCESS_DENIED).

Applies to:   Windows 10 - all editions
Original KB number:   3179598

Symptoms

Consider the following scenario:

  • You have a Windows 10 image.
  • You enable the Windows Subsystem for Linux (WSL) feature.
  • You download and install Ubuntu package by using the command that's documented here.
  • You capture the Windows 10 image by using the DISM /Capture-Image command.
  • You try to apply the captured Windows 10 image by using the DISM /Apply-Image command.

In this scenario, the DISM /Apply-Image command fails with error code 5 (ERROR_ACCESS_DENIED).

Cause

The files that are installed by the Ubuntu package may cause DISM /Apply-Image to fail.

Workaround

Do not download and install the Ubuntu package before you capture the Windows 10 image by using the DISM /Capture-Image command. The Ubuntu package can be downloaded and installed after the Windows 10 image is applied to a device. You can install the Ubuntu package by following the steps in this installation guide.

More Information

For more information about Windows Subsystem for Linux, see Frequently Asked Questions.

For more information about DISM imaging commands, see DISM Image Management command-line options.

Data collection

If you need assistance from Microsoft support, we recommend you collect the information by following the steps mentioned in Gather information by using TSS for deployment-related issues.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
- Supported versions of Windows Client · Source date 02/12/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。