Skip to main content

How to acquire and apply .wim file on Windows 10 and 11 systems using dism

   (REPLACE DRIVE LETTERS FROM EXAMPLES WITH THE ONES YOU NEED AS WELL AS FILE NAMES ECT.) 

ENSURE IMAGE IS WHAT YOU WANT AND RUN C:\Windows\System32\Sysprep\sysprep.exe /generalize /oobe /shutdown /unattend:C:\unattend.xml BEFORE BOOTING TO WINPE 

  • On the windows machine you want to obtain the image from 

    • Create a Windows 10 or 11 bootable flash drive 

    • Plug in and boot to Windows flash drive and another clean flash drive 

    • When it boots to the installation environment find and click Repair my PC > Troubleshoot > Command Prompt or press Shift + F10 

    • Identify drive letters in cmd: 

      • diskpart 

      • list vol 

      • Exit 

    • dism /Capture-Image /ImageFile:D:\Images\CNC.wim /CaptureDir:C:\ /Name:"CNC Win11 IoT" /Compress:Max /CheckIntegrity 

  • Now you need the system image and a win11 bootable iso flashdrives 

  • On machine you want to apply image 

    • Insert flash drives and boot from win11 flash drive 

    • On the first setup screen press shift + F10 to open command prompt 

    • Identify which drives have the windows partition adn which has the .wim using diskpart on cmd: 

      • diskpart 

      • list vol 

  • Format and prepare the target drive in cmd: 

    • list disk 

    • Select disk 0 (WHATEVER NUMBER DISK YOU ARE APPLYING IMAGE ON) 

    • Clean (THIS WIPES THE DISK) 

    • Convert gpt 

    • Create partition efi size=100 

    • Format quick fs=fat32 label=”System” 

    • Assign letter=S 

    • Create partition primary  

    • format quick fs=ntfs label=”Windows” 

    • Assign letter=C 

    • Exit 

  • Apply the WIM Image in cmd:             

    • dism /Apply-Image /ImageFile:D:\Images\CNC.wim /Index:1 /ApplyDir:C:\ 

    • (REPLACE DRIVE LETTERS WITH THE ONES YOU NEED AS WELL AS FILE NAMES ECT.) 

    • If your not sure which index run dism /get-wiminfo /wimfile:D:\CustomWindows.wim 

  • Add boot files 

    • Bcdboot C:\Windows /s S: /f UEFI (OR BIOS INSTEAD OF UEFI) 

  • Reboot 

Video for added assistance: Capturing and Deploying Your Own Custom .wim File