Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock/Hide USB drives #16

Open
bilogic opened this issue Oct 3, 2019 · 2 comments
Open

Lock/Hide USB drives #16

bilogic opened this issue Oct 3, 2019 · 2 comments
Assignees

Comments

@bilogic
Copy link

bilogic commented Oct 3, 2019

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
Copy link
Owner

bgbennyboy commented Oct 6, 2019

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.

@bgbennyboy bgbennyboy self-assigned this Oct 6, 2019
@bilogic
Copy link
Author

bilogic commented Oct 6, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants