Question

On Windows Server, by default, external USB disks don't always get mounted. I'd like my program (written in C#) to be able to detect external USB disks, identify them, and then mount them.

When it's finished, it should do whatever the programmatic equivalent of "Safely Remove Hardware" in order to flush and unmount the disk.

Any pointers?

Was it helpful?

Solution 2

Microsoft has a KB article showing how to do this in C++: How To: Ejecting Removable Media in Windows NT/Windows 2000/Windows XP.

OTHER TIPS

This article at The Code Project may help:

http://www.codeproject.com/KB/system/DriveDetector.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top