I'm trying to write a batch script to detect if an EFI partition is already mounted in Windows.
Ultimately, my goal is to use mountvol /S
(mount EFI system partition) only if the EFI partition is not already mounted.
The diskpart
utility with the list volume
command has some potentially helpful information as does mountvol
by itself, but it looks like both of these will require some string parsing.
Is there a better way?