ManagementObjectSearcher query = new ManagementObjectSearcher("SELECT * From Win32_LogicalDisk"); ManagementObjectCollection queryCollection = query.Get(); foreach ( ManagementObject mo in queryCollection) { switch ( int.Parse( mo["DriveType"].ToString( ) ) ) { case Removable: //removable drives break; case LocalDisk: //Local drives Console.WriteLine( "Local drive found:\t" + mo["Name"] ); break; case CD: //CD rom drives Console.WriteLine( "Local CD found: \t" + mo["Name"] ); break; case Network: //Network drives break; } }