[MSI] setup should not enumerate read-only CDRoms as install-targets CORE-14432

We decided to check a bit different than Wine currently does.
Wine checks for
if (GetVolumeInformationW(ptr, NULL, 0, NULL, 0, &flags, NULL, 0) && flags & FILE_READ_ONLY_VOLUME)
to exclude read-only-media while we (for now) check for
if (GetDriveTypeW(ptr) == DRIVE_CDROM)

For now this gives us the benefit of covering also CDROM drives, that do not have
a CD put into it.
That does not work properly for us with the Wine patch yet, but it does for Wine!
So this maybe points to some other bug in ros, maybe in our CDROM(FS)-drivers?

In the future we should also test this on other read-only-media in Windows e.g.
a read-only USB stick to decide whether we want to stick with our current solution
or whether we want to switch to Wines solution or whether we want to logically OR
both conditions!

Thanks to Doug Lyons for providing what *currently* does work best for us!

VBox https://reactos.org/testman/compare.php?ids=77537,77546 (no change)
KVM https://reactos.org/testman/compare.php?ids=77531,77541 (no change)
This commit is contained in:
Joachim Henze 2021-06-05 21:27:01 +02:00
parent 83fcd65700
commit 864e20b881

View file

@ -3237,6 +3237,13 @@ static void msi_dialog_vcl_add_drives( msi_dialog *dialog, msi_control *control
ptr = drives;
while (*ptr)
{
#ifdef __REACTOS__
if (GetDriveTypeW(ptr) == DRIVE_CDROM)
{
ptr += lstrlenW(ptr) + 1;
continue;
}
#endif
lvitem.mask = LVIF_TEXT;
lvitem.iItem = i;
lvitem.iSubItem = 0;