DESCRIPTION : Is a automatic setup for the OEM Recovery Partition Creator for Windows by AnarethoS, modded for use MBR and EFI to create a recovery partition. Indeed it is an "smart" script that identifies whether it should start the autounattend files for MBR or EFI. BUILD WINDOWS 1X RECOVERY DOWNLOAD 24H2 Recovery Project Build 26100 OEM MEGA.NZ 2004/20H2/21H1/21H2/22H2 Recovery Project Build 19041 OEM MEGA.NZ CONTENT : Include documentations for installation. Include UpdateBootInfo. Include OEM Recovery Partition Creator. Include ScanState. Inlcude OEM Information Updater. Include Yamicsoft Windows 1X Manager. About OEM : This software install the information and theme of your computer's brand like the computers put for resale. Or you can custom OEM informations. Use the documentation to prepare your installation, Now you can just install softwares and drivers and then launch "recovery.cmd" and everything is ready. DON'T FORGET TO LIKE THIS POST ! TIME TO TAKE A BREAK !
This is not a solution to your problem but something worth mentioning. You are using the exclamation mark to expand variables (delayed variable expansion): Code: if !Firmware!==0x1 set UEFI=0 if !Firmware!==0x2 set UEFI=1 if !UEFI! EQU 1 ( But you don't seem to enable delayed variable expansion at the beginning of your script after the line "@echo off" so you're comparing the string "!UEFI!" (literally as it is like that) against the number one, which of course will always be false. As for your original problem, are you sure the file "MBR.xml" exists in the root directory of the setup ?
Thank you wk-952 My file xml exist in the root of directory but the setup not found "X:\MBR.xml not found" I test on VMware.
I updated : Code: @echo off SetLocal EnableDelayedExpansion FOR %%i IN (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\setup.exe SET Install=%%i: :Lastly do the UEFI detection :Check whether user has booted with UEFI or BIOS and set UEFI=1 if UEFI wpeutil UpdateBootInfo for /f "tokens=2* delims= " %%A in ('reg query HKLM\System\CurrentControlSet\Control /v PEFirmwareType') DO SET Firmware=%%B :: Note: delims is a TAB followed by a space. if !Firmware!==0x1 set UEFI=0 if !Firmware!==0x2 set UEFI=1 if !UEFI! EQU 1 ( %install%\setup.exe /unattend:%install%\EFI.xml /m:%install%\sources\EFI ) ELSE ( %install%\setup.exe /unattend:%install%\MBR.xml /m:%install%\sources\MBR ) exit And is the same error
I realized after the boot.wim back that there were also a setup.exe, so logically the script that had the search will take this one and not that of the DVD and then can not find the xml file as it is in the DVD and not the boot.wim. To solve the problem I ask him to look for another file that does not exist in the boot.wim but only on DVD and there attribute the correct drive letter to start the xml file.
thank you for that script, it is a really smart script that allows to boot either from BIOS(MBR) or EFI according to user's bios configuration. I've tested it and it works great. And as i see but i'm not sure about this, you adjusted this script to be able to save time as you can directly lauch "sysprep.cmd" to capture the image after the installation of win10 is finished. if i'm correct, you tested this script on win10 configuration but i suppose that you can use it for all other windows versions. So back to the point i've just mentionned above, what about "install - windows 10.cmd" that you normally have to launch before "sysprep.cmd" in @AnarethoS script project ? did you adjust your script to be able to skip "install - windows 10.cmd" and run only "sysprep.cmd" ? or do you have to run "install - windows 10.cmd" as well before "sysprep.cmd" with your script to be able to make this work ? in other words, is it necessary to lauch "install - windows 10.cmd" just before running "sysprep.cmd" with your script ? or it is not necessary to launch "install - windows 10.cmd" anymore using your script ?
Thank you I'm glad to see your comment My script works for all Windows, it is possible to remove "/m:%install%\sources\EFI" If you do not need to move a Recovery folder. Indeed with this method it is not necessary to run "Install - Windows 10.cmd" as the folder in question is already installed, you just have to put "ResetConfig.xml" of the Settings folder in the Recovery OEM folder before launching Sysprep.exe. The only difference is that the Recovery folder will not have the assignments that it gives "Install - Windows 10.cmd": Code: ATTRIB -S -R -H C:\Recovery ATTRIB -S -R -H C:\Recovery /S icacls C:\Recovery /reset /T /C icacls C:\Recovery /inheritance:r /grant:r SYSTEM:(OI)(CI)(F) /grant:r *S-1-5-32-544:(OI)(CI)(F) /grant:r *S-1-5-32-545:(OI)(CI)(RX) /C ATTRIB +S +H C:\Recovery VoilĂ !
thank you for the reply but i didn't get the last sentence , what do you mean by "The only difference is that the Recovery folder will not have the assignments that it gives "Install - Windows 10.cmd". i see that you speak french, that's good news for me as i speak french as well, so if you could explain what you meant in this last sentence in french, that would be nice.
Hello Chibi Anubis, I would be interested in your script edit as you did I try to do it without success it would be very nice to share it I'm also in France In advance thank you very much for your sharing cordially Amulder
Hello amulder31, I haven't files, is simply follow the post and download the OEM project by AnarethoS, It must be prepared before, I updated my thread, please tell me if you understand the process
Hello ! For Windows 7 and Windows 8-8.1, you just need to prepare the install.cmd for partitioning your hard drive : Just remove the /m argument like : /m:%install%\sources\EFI and /m:%install%\sources\MBR Windows 7 IS ONLY FOR x64 ! Because x86 don't run EFI, you don't need to patch the boot.wim, just put the MBR autounattend.xml winpeshl.ini Code: [LaunchApps] %SYSTEMDRIVE%\windows\system32\install.cmd install.cmd Code: @echo off SetLocal EnableDelayedExpansion FOR %%i IN (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\efi.xml SET install=%%i: :Lastly do the UEFI detection :Check whether user has booted with UEFI or BIOS and set UEFI=1 if UEFI wpeutil UpdateBootInfo for /f "tokens=2* delims= " %%A in ('reg query HKLM\System\CurrentControlSet\Control /v PEFirmwareType') DO SET Firmware=%%B :: Note: delims is a TAB followed by a space. if !Firmware!==0x1 set UEFI=0 if !Firmware!==0x2 set UEFI=1 if !UEFI! EQU 1 ( %install%\setup.exe /unattend:%install%\efi.xml ) ELSE ( %install%\setup.exe /unattend:%install%\mbr.xml ) exit And Copy/Paste the Recovery folder in the root of your ISO, and copy this script Detection BIOS Mode in the Recovery folder. Rename Installer folder to GPT and MBR, this script will copy the folder in desktop, work also with Windows 8-8.1
Hi Dear @Chibi ANUBIS , There is a step-by-step to do it on the Windows 10 Enterprise LTSC 2019 comp 1809 17763.253? Thanks in advanced. Regards.