https://git.reactos.org/?p=reactos.git;a=commitdiff;h=864e20b881130cbc9668b…
commit 864e20b881130cbc9668b8e253a31b8c325e9b99
Author: Joachim Henze <Joachim.Henze(a)reactos.org>
AuthorDate: Sat Jun 5 21:27:01 2021 +0200
Commit: Joachim Henze <Joachim.Henze(a)reactos.org>
CommitDate: Sat Jun 5 21:27:40 2021 +0200
[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)
---
dll/win32/msi/dialog.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dll/win32/msi/dialog.c b/dll/win32/msi/dialog.c
index 376fa491fd8..2ed6815ad6b 100644
--- a/dll/win32/msi/dialog.c
+++ b/dll/win32/msi/dialog.c
@@ -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;