bgbennyboy / USB-Disk-Ejector

A program that allows you to quickly remove drives in Windows. It can eject USB disks, Firewire disks and memory cards. It is a quick, flexible, portable alternative to using Windows' "Safely Remove Hardware" dialog.
http://quickandeasysoftware.net
GNU General Public License v2.0
245 stars 48 forks source link

Lock/Hide USB drives #16

Open bilogic opened 4 years ago

bilogic commented 4 years ago

Hi,

I have a USB drive which needs to be "permanently" attached. Is there a way to prevent me from accidentally ejecting it, e.g. wrong click etc

I can think of 2 ways:

  1. Lock would mean that the drive can be seen, but ejecting is not allowed, this has the additional benefit of knowing my drive is still attached to the machine.

  2. Hide would mean the drive cannot be seen, thus cannot be ejected. The downside is that I'm not able to ascertain if the drive is still attached or not.

Thank you!

bgbennyboy commented 4 years ago

The difficulty is that ejecting a drive is always possible through Windows itself and other mechanisms outside of the program. Hiding would only hide from the program - it'd still be visible in Windows. It would be possible to 'lock' a drive by holding an open handle to a file on the drive. Its not pretty but it might work - trying to eject via Windows would be prevented with the usual 'the drive is in use' message and the program could show the drive as locked. Anything lower level than this would require admin rights and the program is written to run under a normal user account with standard permissions.

bilogic commented 4 years ago

Hi,

I did not mean system-wide ejection lock, just wanted to disable ejection inside USB disk ejector as it is the primarily way I eject instead of struggling to find the small USB icon in the system tray.

But if system-wide ejection lock is possible, that might come in useful too. Thank you.