G
Guest
Hi guys,
I'm looking for a way to temporarily disable the removable storage in
Windows. This is useful in a lab situation where the instructor conducts a
test and the devices can be disabled and enabled unpon request. What I'm
looking at is for a way to block access to the removable drives for a period
in which a session is active. This include floppy, cdrom and usb stores.
1. I've tried setting the registry entry
HKLM\System\CurrentControlSet\Services\<CDrom, Usbstor, Floppy>
Start value to 4
However this only works if the usb device is newly plugged in. For existing
devices, it will not unload them.
2. Next I went to look at CMI and how USB drivers ejected themselves. I can
capture when new usb devices are added and eject them automatically, however
this is still not ideal and I cannot eject -> CDRoms and Floppy.
This can be done using CM_Request_Device_Eject or
CM_Request_Device_Eject_NoUi in setupapi.dll.
3. I think the solution would probably be to disable access to the disk
drives. Any ideas or help on this would be greatly appreciated.
Rakesh
I'm looking for a way to temporarily disable the removable storage in
Windows. This is useful in a lab situation where the instructor conducts a
test and the devices can be disabled and enabled unpon request. What I'm
looking at is for a way to block access to the removable drives for a period
in which a session is active. This include floppy, cdrom and usb stores.
1. I've tried setting the registry entry
HKLM\System\CurrentControlSet\Services\<CDrom, Usbstor, Floppy>
Start value to 4
However this only works if the usb device is newly plugged in. For existing
devices, it will not unload them.
2. Next I went to look at CMI and how USB drivers ejected themselves. I can
capture when new usb devices are added and eject them automatically, however
this is still not ideal and I cannot eject -> CDRoms and Floppy.
This can be done using CM_Request_Device_Eject or
CM_Request_Device_Eject_NoUi in setupapi.dll.
3. I think the solution would probably be to disable access to the disk
drives. Any ideas or help on this would be greatly appreciated.
Rakesh