Windows 11 WIM Incorrect Function when Applying the Image


James Charles

Member
Local time
4:46 PM
Posts
1
Visit site
OS
Windows 11
I am working on creating a Golden Image of Windows 11 24H2 that has all the required configurations and applications for my company as Windows 10 is EOL this year.

The issue I am facing occurs when trying to deploy the image, I am consistently getting an error saying "Incorrect Function", log is pasted at the end.

I feel it might be important to mention I am using Windows PE on a Ventoy USB. The WIM is on the same USB, but this didn't cause any issues for Windows 10.

I've tried the exact same process with multiple fresh installs of Windows 11, all fail; However, Windows 10 succeeded first time (with same config), so I don't believe it's my process. The current process is as follows:

  1. Create reference image
  2. Boot into Windows PE
  3. Dism /Capture-Image /ImageFile:"D:\Dev\GoldenImage.wim" /CaptureDir:W:\
For Deploying (I use official Microsoft Scripts from here)

  1. diskpart /s D:\Utils\CreatePartitions-UEFI.txt
  2. D:\Utils\ApplyImage.bat D:\Dev\GoldenImage.wim
And then I face the Incorrect Function Error (I've also had this error without MS Scripts)

Current things I have tried:
  • Not turning on any Hyper-V features, as I see in the log it mentions a Hyper-V License file
  • Windows 10 - Worked
  • Windows 11 deployed and captured on different devices - same Incorrect Function error
  • Windows 11 deployed without the Microsoft scripts
It appears I only get this error with any Windows 11 OS. When I used Windows 10, all devices worked completely fine without fail once. If anyone could let me know what they think could be going on, that would be greatly appreciated.

Log:

2025-01-08 10:08:17, Info DISM PID=1716 TID=1736 Scratch directory set to 'X:\windows\SystemTemp\'. - CDISMManager::put_ScratchDir

2025-01-08 10:08:17, Info DISM PID=1716 TID=1736 DismCore.dll version: 10.0.26100.1 - CDISMManager::FinalConstruct

2025-01-08 10:08:17, Info DISM Initialized Panther logging at X:\windows\Logs\DISM\dism.log

2025-01-08 10:08:17, Warning DISM PID=1716 TID=1736 Failed to archive the log file. Continuing with existing log file. - CDISMManager::CreateLocalImageSession(hr:0x80070002)

2025-01-08 10:08:17, Info DISM PID=1716 TID=1736 Successfully loaded the ImageSession at "X:\Windows\System32\Dism" - CDISMManager::LoadLocalImageSession

2025-01-08 10:08:17, Info DISM Initialized Panther logging at X:\windows\Logs\DISM\dism.log

2025-01-08 10:08:17, Info DISM DISM Provider Store: PID=1716 TID=1736 Found and Initialized the DISM Logger. - CDISMProviderStore::Internal_InitializeLogger

2025-01-08 10:08:17, Info DISM Initialized Panther logging at X:\windows\Logs\DISM\dism.log

2025-01-08 10:08:17, Info DISM DISM Manager: PID=1716 TID=1736 Successfully created the local image session and provider store. - CDISMManager::CreateLocalImageSession

2025-01-08 10:08:17, Info DISM DISM.EXE:

2025-01-08 10:08:17, Info DISM DISM.EXE: <----- Starting Dism.exe session ----->

2025-01-08 10:08:17, Info DISM DISM.EXE:

2025-01-08 10:08:17, Info DISM DISM.EXE: Host machine information: OS Version=10.0.26100, Running architecture=amd64, Number of processors=12

2025-01-08 10:08:17, Info DISM DISM.EXE: Instance information: Parent process=X:\Windows\System32\cmd.exe, Parent process PID=1600

2025-01-08 10:08:17, Info DISM DISM.EXE: Dism.exe version: 10.0.26100.1

2025-01-08 10:08:17, Info DISM DISM.EXE: Executing command line: dism /Apply-Image /ImageFile:D:\Dev\GoldenImage.wim /Index:1 /ApplyDir:W:\

[1716.1736] [0x80070001] RestoreFileNodeList:(2545): Incorrect function.

[1716.1736] [0xc144012e]

2025-01-08 10:09:27, Error DISM DISM WIM Provider: PID=1716 W:\ProgramData\Microsoft\Windows\Containers\Layers\cb36e839-5674-424c-bcc2-7f52761b2294\Files\Windows\WinSxS\amd64_hyperv-containerlicense_31bf3856ad364e35_10.0.26100.1_none_529fdd02d6d832a7\License.txt (HRESULT=0x80070001) - CWimManager::WimProviderMsgLogCallback

[1716.1736] [0x80070001] RestoreFilesCallback:(3893): Incorrect function.

[1716.1736] [0x80070001] EnumImageDataEntries:(1095): Incorrect function.

[1716.664] [0x80070001] GetImageErrorCode:(8174): Incorrect function.

[1716.664] [0x80070001] ImageWorkerThread:(198): Incorrect function.

[1716.672] [0x80070001] GetImageErrorCode:(8174): Incorrect function.

[1716.672] [0x80070001] ImageWorkerThread:(198): Incorrect function.

[1716.1736] [0x80070001] RestoreAllData:(1303): Incorrect function.

[1716.1736] [0x80070001] WIMApplyImageInternal:(954): Incorrect function.

2025-01-08 10:09:27, Error DISM DISM WIM Provider: PID=1716 TID=1736 onecore\base\ntsetup\opktools\dism\providers\wimprovider\dll\wimmanager.cpp:998 - CWimManager::Apply(hr:0x80070001)

2025-01-08 10:09:27, Error DISM DISM Imaging Provider: PID=1716 TID=1736 onecore\base\ntsetup\opktools\dism\providers\imagingprovider\dll\genericimagingmanager.cpp:2847 - CGenericImagingManager::InternalCmdWimApply(hr:0x80070001)

2025-01-08 10:09:27, Error DISM DISM Imaging Provider: PID=1716 TID=1736 onecore\base\ntsetup\opktools\dism\providers\imagingprovider\dll\genericimagingmanager.cpp:538 - CGenericImagingManager::ExecuteCmdLine(hr:0x80070001)

2025-01-08 10:09:27, Info DISM DISM.EXE: Image session has been closed. Reboot required=no.

2025-01-08 10:09:27, Info DISM DISM.EXE:

2025-01-08 10:09:27, Info DISM DISM.EXE: <----- Ending Dism.exe session ----->

2025-01-08 10:09:27, Info DISM DISM.EXE:
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom Build
    CPU
    AMD Ryzen 5 5600X
    Motherboard
    X570 Gaming-F
    Memory
    32GB DDR4 3600MHz
    Graphics Card(s)
    RTX 3070
    Sound Card
    N/A
    Monitor(s) Displays
    2
    Screen Resolution
    1440p
    Hard Drives
    2
    PSU
    Corsair RM650
    Case
    Matrex 55
    Cooling
    6 Corsair Fans
In this guide, we’ll cover how to create a custom Windows 10/11 installation image with pre-installed apps, necessary files, and other environment and application settings.

 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Pavilion
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    Erica6
    Memory
    Micron Technology DDR4-3200 16GB
    Graphics Card(s)
    NVIDIA GeForce RTX 3060
    Sound Card
    Realtek ALC671
    Monitor(s) Displays
    Samsung SyncMaster U28E590
    Screen Resolution
    3840 x 2160
    Hard Drives
    SAMSUNG MZVLQ1T0HALB-000H1
I see you resolved this already on Reddit:

RestoreFileNodeList:(2545): Incorrect function. refers to an error condition when DISM is trying to capture files, and the original file sat on top of a reparse point (like a junction, or volume hidden by a virtualization layer), and whatever it captured can't be resolved. When /Apply-Image is extracting file nodes, it realizes that reference is no longer valid.

In theory, you wouldn't have needed WinPE to validate the /Apply-Image. It could be extracted to any valid NTFS filesystem as an extraction test. DISM is really trying hard to preserve hardlinks when capturing or extracting, because most of your image's Windows files are hardlinks to the WinSxS repository. If it didn't follow hardlinks correctly, the actual on-disk size would be bloated.
 

My Computer

System One

  • OS
    Windows 7

Latest Support Threads

Back
Top Bottom