Thanks to this post we can find USB port number of all segger devices connected.
But, as commented:
If I have both the dongle and the dev kit (plugged to the PC by USB to get power supply). Then both port names are found and we cannot know which one should be picked up.
and
If you open nRFgo Studio the Device Manager window will tell if the Segger ID is a nRF51 Development board or dongle, so surely there is some mechanism to find out
Does any one know how to differiate dongle from dev kit using the registry?
As commented by Rasmus on the other post:
I've searched the registry and found that the value of VID_1366&PID_1015<Segger_ID>\Capabilities are different between my development board and dongles. On the development board Capabilities has a value of 0x00000090 (144) and on my three dongles Capabilities has a value of 0x00000094 (148). I don't know if this is reliable data, but it is the only thing I can find separating dongles from boards in the registry.
Is it safe to use that?