Hmm, interesting case. How does WinPE, which integrates additional utilities for Windows recovery, affect the installation of the OS? That's right, not at all. That’s why I personally always delete it to reduce the size of the image. Because personally, I don’t need it at all.
I don't understand this. I always get an error during installation if winre.wim is removed. How do you do this removal?
It's very simple, add the following code to your "Cleaning install.wim image" section of the script: del /f /s /q "%~dp0Mount\Windows\System32\Recovery\*" >nul 2>&1 Personally, I think that this is also not needed in the image and I add a few more lines to this code: del /f /s /q "%~dp0Mount\Windows\System32\InputMethod\*" >nul 2>&1 del /f /s /q "%~dp0Mount\Windows\System32\migration\*" >nul 2>&1 del /f /s /q "%~dp0Mount\Windows\System32\migwiz\*" >nul 2>&1
I was using these codes before, but I got an error during installation... I'll try again and post the result here.
You are making a mistake when installing the OS not because of these deletions, but because of changes in the structure of the boot.wim file. Do not touch the boot.wim file and there will be no errors. Because these files have nothing to do with the OS installer at all. All that can be done painlessly with the boot.wim file is to delete its index "1", the WOW64 file and unused drivers. But personally, I never touch the driver.
But this new script doesn't change anything with boot.wim. And I have the error in the attached image. I'll try to replace the boot.wim with the one from Windows 10...
Actually when I use script version newer than 7.8.7(haven’t tested 9.0 yet) I got the first error of your screenshot. After choosing disk destination the "Windows 11 installation failed" error poped up. No matter slim or default image. That keeps me from using new scripts.
In my tests a win 10 Boot.wim will not work with a win 11 image without modification, best use a win 11 boot.wim in the first place. What I do recommend doing with your win 11 boot.wim is as follows: Code: DISM /Mount-Wim /wimfile:D:\sources\boot.wim /index:2 /mountdir:C:\Mount reg load HKLM\TEMP C:\Mount\Windows\System32\config\SYSTEM reg add HKLM\TEMP\Setup /v "CmdLine" /t REG_SZ /d "X:\\sources\\setup.exe" /f reg unload HKLM\TEMP DISM /Unmount-Wim /mountdir:C:\Mount /commit"
AutoUnattend.xml is of course very convenient when installing an OS, but you need to look at what people wrote there. An incorrectly compiled AutoUnated.xml can easily break the system. Try to take this file from the proposals that I posted above, this file is definitely problem-free. Or, to check this issue with this file, try installing your system without it at all. You will see the result of this experiment on the newly installed OS.