Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

How to change COM port number

Status
Not open for further replies.

quantum1976

Computer
Feb 14, 2006
1
0
0
US
I need to write a program in VB6 to list all of the available COM ports on a computer and allow the operator to change the COM port number. I can get the list of available COM ports using the WMI but how to I change the COM port number?

I have to support a legacy program that looks for connections to devices on specific com ports. Genius that this original programmer was, he hard coded those com port numbers.

Currently we use a Digi edgeport with 4 serial ports. The Edgeport comes with a utility that allows you to change the COM port numbers. However we would like to move to single USB to serial devices (serialized of course), which do not provide the same type of utility. I would like to write a VB6 program to help with setup by allowing the user to connect a terminator to a serial port, send a message out to each available com port, and look for the response. Once the user identifies the serial port I want to allow them to change the com port number to one of the hard coded ports.

Of course they could use the device manager to change the com port numbers but I wanted to make an automated, easy to use utility, since the users will not be computer savy.

Any ideas?

Thanks,
quantum1976
 
Status
Not open for further replies.
Back
Top