0

I'm preparing wim images that contains both win 7 and win 10 images. I will give them to technicians and they will check if the computer will be win 7 or win 10, if it'll be win 7 then they will go to bios settings and change UEFI to Legacy etc.. I want to automate this process.

Is there a way to make it possible for WinPE to boot both Legacy and UEFI at the same time?

3
  • 1
    You can't boot UEFI and CSM at the same time, but preparing a bootable USB-stick that is capable of UEFI and CSM boot depending on what is available is possible e.g. using the tool "Rufus".
    – Robert
    Commented Aug 10, 2021 at 13:42
  • 1
    Windows 7 supports UEFI. Why are you going to unnecessarily use MBR for Windows 7? The default WinPE already supports both by the way
    – Ramhound
    Commented Aug 10, 2021 at 13:45
  • @Robert The only way to do that with Rufus is by selecting the non-default / not recommended "DD" option. By default it makes one or the other as that is its reason for existing according the the developers own words (they really dislike the hybrid ISO concept). Commented Aug 10, 2021 at 14:37

1 Answer 1

1

If you follow Microsoft's instructions on creating a bootable WinPE drive, it will be bootable from both Legacy and UEFI BIOS.

The \boot\ folder contains the Legacy boot files while \EFI\ contains the UEFI boot files.

As far as using different wim files for Legacy / UEFI:

wpeutil /UpdateBootInfo
reg query HKLM\System\CurrentControlSet\Control /v PEFirmwareType

If the above command returns 0x1 PE booted into BIOS (Legacy) mode, if 0x2 UEFI. Based off that, you could write a simple script that selects the wim you with to use.

2
  • The problem the author will have is being able to use both the Windows 7 and Windows 10 install.wim on the image. You can put multiple images, of the same version of Windows, within a single windows image without an issue. However, trying to create a multi-image media is something else entirely.
    – Ramhound
    Commented Aug 10, 2021 at 14:07
  • @Ramhound thanks! I'll update my answer.
    – Josh Zhang
    Commented Aug 10, 2021 at 14:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .