RayT
asked on
USB Drive Ejection using MS Visual Studio Pro
I'm creating application using Microsoft Visual Studio Professional 2022 (Visual Basic). And my OS is Microsoft Windows 11 Pro for Workstations
Within the app I want to be able to eject a USB drive.
Is there a simple way to accomplish USB drive ejection?
I've never had to do this, so was curious. In some quick looking it doesn't seem to be easy, it's more complex than I might have guessed. Including a few of the more popular links I peeked at in case you are interested.
Would you want to eject the same drive letter all the time, or "locate" the desired USB by volume name, etc?
»bp
Would you want to eject the same drive letter all the time, or "locate" the desired USB by volume name, etc?
- USB Disk Ejector - Quick And Easy Software
- Vb.NET source code to EJECT your USB (FLASH DISK) : | IT
- VB code to eject Portable drive
»bp
ASKER
In my application i want to be able to pass the drive letter and the function will do the rest.
ASKER
The ones Bill shows are the ones i've seen. The amount of code to perform a seemingly simple task is crazy! I was hoping to find one that's much shorter.
Agreed, I was a bit surprised at the amount of code...
»bp
»bp
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks! Have a Happy Thanksgiving!
if you are using default settings, it is not required anymore: https://learn.microsoft.com/en-US/windows/client-management/change-default-removal-policy-external-storage-media