Block Floppy, CDRom, USB

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
 
R

RobinS

This is a .Net Programming newsgroup. Is this a .Net question? If so,
please give more information. Otherwise, if you want help with your
question, please try posting your message to a newsgroup with "windows" in
the description. They are on the bottom of the dropdown list in the MS
Discussion Group interface. This is a .Net Programming newsgroup.

Robin S.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top