Mount-WindowsImage error: access denied

Neo 421 Reputation points
2024-07-27T03:59:49.0433333+00:00

I extracted install.wim from Win11_23H2_English_x64v2.iso to C:\TEMP, and tried to run the following command (in an elevated Terminal window):

PS C:\TEMP> Mount-WindowsImage -ImagePath c:\temp\install.wim -Path c:\temp\mount -index 4 -ReadOnly
Mount-WindowsImage: 拒绝访问。

The detailed log in C:\Windows\Logs\DISM\DISM.log shows:

2024-07-27 11:55:31, Info                  DISM   DISM Imaging Provider: PID=22656 TID=15120 WIM image specified - CGenericImagingManager::GetImageInfoCollection
[22656.15120] Mounting new image.
Wim:         [c:\temp\install.wim]
Image Index: [4]
Mount Guid:  [aea6cc12-517d-402e-85c0-6ab6bb05642d]
Mount Path:  [c:\temp\mount]
[22656.15120] [0x80070005] FIOVolumeOpen:(1636): 拒绝访问。
[22656.15120] [0x80070005] ImageCreate:(269): 拒绝访问。
[22656.15120] [0x80070005] WIMMountImageHandle:(1182): 拒绝访问。
[22656.15120] [0x80070002] StateStoreRemoveMountedImage:(1124): 系统找不到指定的文件。
[22656.15120] [0x80070002] WIMMountImageHandle:(1344): 系统找不到指定的文件。88 "Failed to mount the image." - CWimImageInfo::Mount(hr:0x80070005)

I am sure I have full control over install.wim file in elevated mode; I even have full control in normal mode.

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,337 questions
0 comments No comments
{count} votes