I'm trying to build an installer for some devices that must use an especific com port of the machine. Is there any way to look for this ports and show them to the user, so he can select one of them?.
In order to achieve this, you can use the Check TCP port and the Get a free TCP port predefined custom actions. These custom actions allows you to check if a TCP port is free and to get one.
Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.
Advanced installer can launch and execute VBS scripts.
So what I am thinking is that you can try to use VBS script to query WMI for COM ports.
I found this example VBS online. I haven't tested it myself, but seems like it could work. Query WMI via VBS for serial port configuration