mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-23 11:17:03 -04:00
[core] prevent the enumeration of Windows 10 19H1 sandbox VHDs
* The new 19H1 Windows Sandbox feature relies on VHDs labelled 'PortableBaseLayer' → Don't list those
This commit is contained in:
parent
5b1ae09df4
commit
f95aa94c57
5 changed files with 27 additions and 8 deletions
|
@ -453,6 +453,7 @@ BOOL GetDevices(DWORD devnum)
|
|||
"_SD_", "_SDHC_", "_MMC_", "_MS_", "_MSPro_", "_xDPicture_", "_O2Media_"
|
||||
};
|
||||
const char* usb_speed_name[USB_SPEED_MAX] = { "USB", "USB 1.0", "USB 1.1", "USB 2.0", "USB 3.0" };
|
||||
const char* windows_sandbox_vhd_label = "PortableBaseLayer";
|
||||
// Hash table and String Array used to match a Device ID with the parent hub's Device Interface Path
|
||||
htab_table htab_devid = HTAB_EMPTY;
|
||||
StrArray dev_if_path;
|
||||
|
@ -883,6 +884,13 @@ BOOL GetDevices(DWORD devnum)
|
|||
safe_free(devint_detail_data);
|
||||
break;
|
||||
}
|
||||
// Windows 10 19H1 mounts a 'PortableBaseLayer' for its Windows Sandbox feature => unlist those
|
||||
if (safe_strcmp(label, windows_sandbox_vhd_label) == 0) {
|
||||
uprintf("Device eliminated because it's a Windows Sandbox VHD");
|
||||
safe_closehandle(hDrive);
|
||||
safe_free(devint_detail_data);
|
||||
break;
|
||||
}
|
||||
|
||||
// The empty string is returned for drives that don't have any volumes assigned
|
||||
if (drive_letters[0] == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue