[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Detecting the number of COM ports?

Posted on 1998-07-02
2
Medium Priority
?
200 Views
Last Modified: 2013-11-19
How to detect the number of serial (com) ports in the system?
.......
Ok, found the number in the registry ....
is there another way e.g. in a structure such as SYSINFO, COMMCONFIG ...?
0
Comment
Question by:nil092297
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:nil092297
ID: 1318623
Edited text of question
0
 
LVL 1

Accepted Solution

by:
Musashi earned 160 total points
ID: 1318624

See the following article

Q100372 : Detecting Windows NT Serial Ports

Basically, the structure which windows uses to maintain such information IS the registry, so you just need to read it from there.

There is also another article you might be interested in which also makes it obvious that the registry needs to be manipulated:

----------------------------------------------
Deleting Serial Ports
You can configure communication ports as described in the previous section or as described in "Serial Subkey Entries in the Services Subkey" in Chapter 14, "Registry Value Entries." You might also need to delete one or more COM ports, which you can only do by deleting the related Registry information in the DeviceMap and Services areas of the Registry. To delete entries in the DeviceMap subkey, you must be logged on as a member of the Administrators group.

To delete a COM port
In Registry Editor, delete the appropriate value entry for the COM port under the following Registry path:
HKEY_LOCAL_MACHINE\Hardware\DeviceMap\SerialComm

The value entries in this subkey are used to determine all the communication ports available on the system. The values are of the form Serialyyy=COMx, where COMx can be COM1 to COM256, and Serialyyy can be from Serial0 through any large positive number such as Serial15000.

You can identify the value entry you want to delete based on the list that appears when you choose the Ports icon in Control Panel.

Delete the COM port's related Serialyyy key in the following Registry path:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services
\Serial\Parameters\Serialyyy

If you do not delete the related Services subkey for Serialyyy, the COMx port continues to appear in the Ports list in Control Panel each time the system starts, even though there is no related DeviceMap subkey.
---------------------------------------------

0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question