tags:

views:

776

answers:

2

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?

+1  A: 

This article at The Code Project may help:

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

ChalkTrauma
I'll take a look at that later; thanks.
Roger Lipscombe
A: 

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

Roger Lipscombe