Вот здесь много по теме: How COM Ports Are Allocated On DriverInstallation