Hi,
I'd like to be able to temporarily block access to the cdrom/usb store/floppy drives and then reactivate them after a period of time. I have looked at several code that allows notifications of insertions, ejecting usb, But not disallow access to these devices temporarily. This is especially useful in a lab environment when we conduct a test and the removable medias can be blocked until the test is over.
I have tried to edit the start command in the registry for the devices, however that only works for new devices that will be created. Hence if the usb or cdrom is already plugged into the system, it will not be disabled until u restart the machine.
I think the only way is to use WMI or the "setupapi.dll".
Any help would be greatly appreciated.
[email removed]
Rakesh