UPDATE: 2028-08-18
1. Multiple USB removable drives aren't detected because I didn't bother testing with two drives
2. Relocate the rest of Check_UEFI-CA2023.ps1's "REQUIRED ACTIONS" code to Run-FiniteStateMachine()
3. Add backup URL for downloading wimlib-1.14.5
4. Check if boot.wim is missing two DLL files required for "Repair My PC" to work
5. Check_BootMedia.ps1 didn't check if a temporary WIM existed, and exporting a SWM caused unchecked appends to the temp file
6. Detect Ventoy USB drives from Check_BootMedia.ps1
Mostly big changes to the
Check_BootMedia.ps1 script.
Thanks to everyone's patience and endless rounds of user testing, I believe we have a solution that correctly recognizes almost everyone's USB removable drives. Fixeds drive with a FAT/FAT32/exFAT filesystem will be scanned too. Except for
@t2s50's backup copy of a boot drive (because he's a NTFS rebel).
Big thanks to
@Quandary and
@t2s50 for providing specific test cases that help me understand what the original logic was doing wrong. Props to everyone else who ran all the test scripts in the past 3 weeks.
I've added a backup method to download wimlib from the Wayback Machine (web.archive.org), when the primary website is not responding.
@fg2001gf11F's complaint about "Repair My PC" being broken in boot.wim (not winre.wim) is checked. But only in
-Verbose mode, because not everyone cares about this WinPE feature and they would probably complain this notification confuses them.
Fixed some bugs with analyzing SWM files, mostly with how the temporary file was handled.
Detect you have a Ventoy drive, but we can't do much about verifying if it's bootable since Ventoy uses 3rd-party boot files (and we cannot check the MOK from Windows). We can't really scan the ISO files since you're allowed to place any kind of ISO and there isn't a forced standard for naming ISO files. The script is mostly saying "we know this is a Ventoy drive, so don't expect anything".
But you can always scan any Windows ISO file copied to the Ventoy drive (if you treat it as a standalone file):
Code:
Check-BootMedia F:\ventoy\Windows1.iso F:\ventoy\folder\Windows2.iso