PDA

View Full Version : How to detect available Com Ports on setup computer?



Traxs
03-02-2011, 02:14 AM
Hi Guys

I have checked this forum and also the docs but it seems no where is an example for detecting the good old fashion (Serial) Com Ports on a computer in SetupBuilder.

Has anyone done this? If so, could you give me a example of how you did the detection of the Com Ports. It would be nice also to be able to show which ones are in use and which not not in use (ie. available), if possible.

Thanks. Have a great day.

Regards

Wolfgang

linder
03-02-2011, 04:53 AM
Wolfgang,

How would you do it without SetupBuilder? Once you know how to do this, we can then try to convert this to SetupScript. Or if you have a DLL available that can handle it (e.g. open source), you can call this DLL from your installer.

Friedrich

Unregistered
03-02-2011, 06:11 AM
Hi

Was wondering, is there a way in SetupBuilder to get what type of devices is installed. As the Windows Devices in the Control Panels give you a list of Com Ports availabe. Can SetupBuilder check for this?

Wolfgang

linder
03-02-2011, 06:26 AM
Hi Wolfgang,

Perhaps it is already enough to enumerate the values under HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM in your setup? You can use the "Get Registry" functionality to handle this and read the COM values.

Does this help?

Friedrich

linder
03-02-2011, 06:30 AM
BTW, I have attached a quick and dirty demo for you.

Friedrich

Traxs
03-02-2011, 06:48 AM
Hi

Just fantastic..! It is simple and just perfect for what I am trying to do...


Thanks.

Regards

Wolfgang

linder
03-02-2011, 07:38 AM
You are very welcome :)

Friedrich