473,377 Members | 1,119 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,377 software developers and data experts.

Block Floppy, CDRom, USB

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
Mar 17 '07 #1
1 4200
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.
--------------------------------
"Rakesh Gupta" <Ra*********@discussions.microsoft.comwrote in message
news:E4**********************************@microsof t.com...
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


Mar 17 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: enclume42 | last post by:
Hello, I am a pure Linux guy. I wrote a Java program that is going to be used by some Windows people, and I wish the startup of the program to be as simple as possible, namely to double-click on...
8
by: Ken Varn | last post by:
Everytime I call Process.GetCurrentProcess() the system goes out to the floppy drive. Why does this happen. I decided to use FileMon to get a log of what is happening when this occurs. Here is...
1
by: Peter D | last post by:
I have a database in ACCESS 97 and i have a routine that copies the tables to a database onto a floppy. What i would like is a routine to transfer the data from the floppy into the tables in a...
6
by: helpless newbie | last post by:
Hello. I'm a newbie in c programming. I'd like to make a program for creating an image file from a floppy disk. Is there anyone with agood point of start in doing this? Thanks.
0
by: Elias | last post by:
Hi, I recently started playing around with the DAAB from Microsoft as part of the Enterprise Library...
10
by: Just Me | last post by:
If I periodically check to see if the floppy is ready, the drive will each time make a little noise. I've been up against this before and could never find a way to check to see if the floppy...
3
by: Ognjen Bezanov | last post by:
Hello, I am trying to control a CD-ROM drive using python. The code I use is shown below.
1
by: Rakeshkg | last post by:
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...
4
by: Academia | last post by:
I don't suppose there is any way to tell if there is a floppy in a floppy drive without activating the drive and causing it to make a noise if there is no floppy in the drive. Is there? ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.