locked
Need to identify COM port designation through DOS... RRS feed

  • Question

  • I'm editting a program that sends and receives information to a device via a USB - Serial adapter. Previously the program was only run on a single pc which always used the same COM port when the device was connected. Scripts used with this program were written to always specify this port. Having taken the device and connected it to another pc, the pc allocates a different COM port - it is a relatively simple task for myself to go through the Device Management and identify the correct COM port, edit the script and get the device communicating with the pc. HOWEVER, in the future, communication needs to be maintained between the device and any laptop with any user.

     

    The program in use can open a windows command prompt and execute DOS commands. If possible, I would like help in finding out how to use DOS to identify the COM port in use by the USB adapter, so I can assign this port number to a variable for use in the scripts, thus creating them fool proof to any user.

     

    Thanks for your time,

    Chris

    • Changed type Chris409 Friday, July 27, 2012 8:05 AM Wrong location
    Friday, July 27, 2012 7:33 AM