This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Configuration of COM ports

  • 2 contributors

A COM port is a type of serial port that complies with the following additional requirements:

You access the COM port through an instance of the COM port device interface class. The GUID for this class is GUID_DEVINTERFACE_COMPORT, which is defined in Ntddser.h.

You operate the COM port by using the 16550 UART-compatible interface that is defined in Ntddser.h.

To ensure compatibility with most applications that access COM ports, you should assign a symbolic link name that uses the standard naming convention COM<n> , where <n> is the COM port number (for example, COM1). If you use a COM<n> name, you must obtain the COM port number <n> from the COM port database . COM port numbers should only be used with COM<n> names.

By default, the combined operation of the class installer for the Ports device setup class and the Serial function driver configure a device as a COM port.

For information about how the Ports class installer and Serial function driver create a COM port device interface for a COM port, see External naming of COM ports .

Was this page helpful?

Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback .

Submit and view feedback for

Additional resources

Cookie

COM port in Windows 10 & 11: fix any COM port-related issues in 2 easy ways

Olga Weis

In this article, we are going to discuss two ways to resolve the problem of the lack of COM ports on computers running the Windows 10 and/or 11 operating system . Windows 10 and/or 11 COM port issues plague many users whose computers have been designed without the inclusion of any serial interfaces. The absence of physical COM ports can hinder a user’s ability to make use of computing peripherals that transmit their data serially.

The way to resolve this issue is through the use of Windows virtual serial ports. It can be very frustrating to query your Device Manager with the expectation of finding COM ports only to find that they are not present. We are going to show you two different methods you can use to add COM ports to Windows 10 and Windows 11 . One is a procedure that employs the native functionality built into the operating system and the other uses third-party software.

Virtual COM Port Driver

The Problem: Windows 10 COM ports not showing in device manager

Finding virtual COM port in Windows 10 causes issues for some users. Individuals navigate to their Device Manager, anticipating that they’ll find virtual COM port drivers previously loaded on their machine.

However, when they open their Device Manager, they’re perplexed and frustrated once they realize these COM ports aren’t listed.

The reason being, said serial port option may not be available because of the Windows 10 update installation.

The update could impact virtual serial port drivers ability to load specific devices by default. This creates a major problem for those using such (seemingly) incompatible devices.

There are several solutions. One option is to find com port Windows 10 by following the steps below:

Step 1: Open the Device Manager.

Step 2: From the menu bar, click View.

Step 3: Choose “Show hidden devices”.

Step 4: From the list of hidden devices, find the Ports (COM & LPT).

Step 5: Expand the same menu (“+”) to check for the missing COM ports.

If you can't find com ports this way, the next step is investigating how it can be done with Electronic Team’s Virtual Serial Port Driver for Windows 10 virtual serial ports.

To ensure the easiest solution possible, see our step-by-step procedure below. A process that can help users eliminate problems with their COM ports on Windows 10 in as few as three clicks.

Keep reading to learn how easy and convenient it is to use this Windows 10 virtual COM port driver.

Add COM port Windows 10 with Virtual COM Port Driver

When the COM and LPT ports do not appear in your Windows 10 Device Manager your ability to perform your work is negatively impacted. There is a way to resolve this annoying problem in a manner that will prevent it from recurring. The solution is to install the aforementioned Virtual COM Port Driver from Electronic Team . This application allows the creation of an unlimited number of virtual serial port pairs. The virtual COM port pairs employ a virtual null-modem connection to enable communication with each other.

  • Virtual COM Port Driver

VSPD logo

Virtual Serial Port Driver

Virtual Serial Port Driver

Users engaged in the practice of developing and testing serial applications and hardware will benefit from the configuration options that are possible through the use of Virtual Serial Port Driver. One example is the ability to allow two applications to share data via virtual serial ports. Connecting the apps with a pair of virtual COM ports lets the data written by one program be immediately made available to the other program. This can save significant time and effort when debugging and testing serial apps and devices.

Step-by-step guide to add virtual COM port Windows 10:

blank

Create virtual COM ports in Windows 10 with USB Serial Converters

Most often, virtual COM ports in Windows 10 install automatically when a user connects a converter to a computer with internet access. Unfortunately, there are Serial Converter device drivers that won’t automatically install on certain operating systems.

This is not a major issue, as users can simply install the drivers utilizing the disk that comes with their specific Serial Converter.

Follow the instructions below to install Serial Converter device drivers from a disk:

  • After inserting the CD into the disk drive, connect the USB Serial Converter to an open USB port.
  • The “ Found New Hardware Wizard ” should run automatically, and will guide users through the remaining installation.
  • Once prompted to connect with Windows Updates (which will ask to search for available drivers), choose the “ No, not at this time ” option.
  • Follow all instructions to complete driver installation using the provided CD.
  • ○ Under “Ports (COM & LPT)”, the device will be labeled as “ USB Serial Port (COMx) ”

Device Manager

  • If drivers haven’t been installed correctly, a yellow exclamation icon is displayed under the “Ports (COM & LPT)” or “USB Serial Bus Controllers” menu.
  • To fix any issues with installation: right-click the yellow exclamation icon, click “ Update Driver ”, and then search for the necessary driver (located on the disk provided with the USB Serial Converter).

How to change COM port settings in Windows 10

Some software applications are designed to only operate with designated serial ports. If you need to work with this kind of program, you may need to know how to find port numbers in Windows 10 so you can modify them if necessary.

In many cases when working with older devices or applications, you will be called upon to change COM port numbers to successfully operate the programs and peripherals. Some legacy equipment is only capable of working with specifically named serial ports.

The following procedure allows Windows users to change the COM port number for any attached device.

Just follow these simple steps on a Windows 10 machine to change the default COM port number.

Step 1

  • The Advanced Settings window is where you perform the number reassignment. You select an available port number from the list presented in the lower-left of the window. In our example, we are updating the device’s number from COM 3 to COM 5.
  • Save the settings by clicking the OK button. This will close the open windows. The new number may not be assigned until the device is removed and reconnected to the computer.

Tip: Here is what you can try if COM ports are not showing in Device Manager:

  • Open Control Panel.
  • Search for “device” using the box in the top-right corner and select Device Manager from the results.

How to assign a COM port to a USB device Windows 10?

There are multiple scenarios in which you may need to assign a COM port to a USB device on your Windows 10 computer. Some devices need to have a COM port identifier that falls within a certain range, say between COM1 and COM4. Windows may have assigned a different identifier to the port which you will be required to modify. It’s a relatively simple procedure to perform.

Here is how to assign a COM port to a USB device Windows 10:

  • Open the Windows Device Manager.
  • Click on the Ports (COM & LPT) to expand the selection. You will see the ports currently in use along with their designated port identifier.

COM to USB Windows 10

  • Click on Port Settings and then click the Advanced button .
  • Locate the COM Port Number at the lower left of the Advanced Settings window.
  • Click the Com Port Number to change the currently assigned port identifier. Select the COM port identifier that you wish to assign to the USB device attached to the port.
  • Click OK on all open Property windows.

change the COM port identifier for USB devices

Following these steps will enable you to change the COM port identifier for USB devices attached to your Windows 10 machine.

How to Reset com ports Windows 10

COM port (Communication port) is the title given to the port serial interface that’s located in a common (IBM compatible) computer.

There are occasions when computers offer users one or two physical COM ports (RS-232), but today's models usually lack these physical COM ports. It should be known that COM ports don’t always refer to physical ports. Virtual ports are available as well. These ports are developed when a USB-to-UART adapter is used—most often utilized by FTDI and Croduino.

See below for multiple examples of such devices (AKA cell phones, USB modems, RFID readers, card readers, etc.)

In each instance where Windows registers a new device (one which possesses a new ID), Windows connects that device to an empty port, from COM 1 port if you didn’t have any connections before, then (COM2, COM3, COM4, ​​etc.—from 1 to 255).

Additionally, every port is exclusively assigned to a single device, remaining occupied (Windows displays the COM port as “in use”) even when the device isn’t connected anymore.

For a majority of the time, this isn’t an issue unless users attempt to run certain legacy software (software that struggles to function with COM-ports higher than 9.)

One example is when an app functions effectively with COM1 to 9, but fails if no unoccupied COM ports below COM10 are available.

Another problem can occur when certain devices require far too many COM ports to function.

Specific adapters could reserve up to 30 (or more) COM ports. This situation means users are forced to delete COM ports being used in Windows—or switch a currently occupied COM port to a different device.

The tutorial below will explain how to clear currently occupied COM ports, as well as how to disable the numbering of new ports.

  • Step 1: Hit Win+R (write regedit then click Enter).
  • Step 2: Search through folders: HKEY_LOCAL_MACHINE\SYSTEM\CurrentConstrolSet\Control\COM Name Arbiter .

ComDB

Note: This opens a window displaying port addresses.

  • Step 4: Enter all zeros to reset.

edit binary value

What is USB serial port driver FTDI

Virtual COM port (VCP) drivers make USB devices appear as additional COM ports that the PC can access. USB devices can be accessed by application software similarly to how it would access standard COM ports.

Future Technology Devices International Limited’s software is offered “as is”. Any and all described (or implied) warranties (including, but not limited to, implied warranties of merchantability and fitness for a particular purpose) are disclaimed.

In no event shall Future Technology Devices International Limited be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused, and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

FTDI drivers can be used only in conjunction with products based on FTDI parts.

Frequently Asked Questions

How to find device manager on windows 10.

  • Using Windows Search The easiest way is to use the default Windows search bar located next to the Start Menu on the toolbar. Simply start typing “Device Manager” into the search field and it will be located for you with an easy “Open” link to access it.
  • Open the Control Panel on your computer.
  • Locate the “View By” option in the top right of the “Control Panel” screen.
  • Select “Large icons” or “Small icons” according to your preference.
  • “Device Manager” will be listed - all icons are ordered alphabetically in ascending order.
  • From the WinX menu There are two ways to access the WinX menu. Either right-click on the “Start” menu or you can press Windows + X keys on the keyboard at the same time. Device Manager will be listed as an option in the menu that appears.
  • devmgmt.msc
  • mmc devmgmt.msc
  • control hdwwiz.cpl
  • From the Computer Management Console You can access the Device Manager from the Computer Management Console. Device Manager will be listed in the left panel under System Tools.

How to find COM port number on Windows 10?

  • If the details of your COM ports are not visible in the Device Manager, open Device Manager and click on “Action” from the menu bar.
  • Select the “Add legacy hardware” option, then click Next.
  • Choose the “Install the hardware that I manually select from a list (Advanced)” option, and click Next.
  • When complete, the “Ports (COM & LPT)” group will be listed in the Device Manager. Expand the group to view your device. The port along with the port number ie. Communications Port (COM4) will be displayed accordingly.

How to install a serial port driver?

  • Download Virtual Serial Port Driver
  • Double click to launch the application. If you see a User Account Control message, click “Yes” to allow the application to be installed.
  • Follow the steps in the installation wizard. Read and accept the License Agreement, and click Next to continue.

Can't open the serial(com) port, What to do?

  • Number 1: Connection to com1 Windows 10, com3 wouldn’t open. This issue sometimes occurs if users lack the required drivers. Solve this problem by updating the serial port driver, then verify the issue was resolved.
  • Number 2: Putty can’t open Windows 10 serial port. This can happen because of certain Windows services. Resolve this issue by disabling these services.
  • Number 3: Access to the serial interface com1 cannot be opened – This problem may occur due to problems with the serial interface. Resolve the problem by temporarily disabling the serial port
  • Number 4: Com ports can’t open win error code 5, 123, 32. These are very common issues that often occur with a serial port Resolve most of these problems with one of our solutions

serial port properties

  • COM Port on Windows 10

How To Detect the COM Port for Any Serial Device in Windows

Serial Port Notifier takes the sting out of seeking out the correct COM devices.

Serial Port Notifier

Working with USB serial devices isn’t the most simple of workflows. We first need to identify the COM port, found under Device Manager, then we need to tell our application to use that COM port.

Serial Port Notifier

What if we could receive an automatic notification of COM devices, and then configure them to open with specific applications? Serial Port Notifier by Amr Bekhit is just what we need. 

At the most basic level, Serial Port Notifier tells us when a device is connected / disconnected via a notification. But under the hood, we can give our devices custom names and create launchers that will open specific applications.

For this project you will need

  • PC running Windows 10 / 11
  • USB serial device such as a Raspberry Pi Pico

Installing Serial Port Notifier

 1. Download Serial Port Notifier from SourceForge.

2. Allow the installer to make changes to your machine.

Serial Port Notifier

3. Click Next to accept the default Start Menu Folder.

Serial Port Notifier

4. Click Install to finish the installation.

Stay On the Cutting Edge: Get the Tom's Hardware Newsletter

Get Tom's Hardware's best news and in-depth reviews, straight to your inbox.

Serial Port Notifier

5. Click Finish to close the installer. There are two tick boxes. One for the readme file, the other launches the application. The readme is optional, but ensure “Run Serial Port Monitor.exe” is selected.

Serial Port Notifier

Using Serial Port Notifier

Serial Port Notifier

Serial Print Notifier lives in the Notifications area and, at the most basic level, it will automatically pop up should a USB / Serial device be connected / disconnected. We can use the COM port value in our projects, for example flashing code to an Arduino , Raspberry Pi Pico or other microcontroller board.

The basic functionality works as follows.

1. Insert a USB serial device . We used a Raspberry Pi Pico running CircuitPython.

2. Take note of the notification that will appear in the Notifications area.

Serial Port Notifier

3. Remove the USB serial device.

4. Note that Serial Port Notifier confirms the device has been removed.

Serial Port Notifier

Rename COM Devices

COM port numbers are useful but being human we prefer names. Luckily we can rename a COM port for easy identification.

1. Connect your USB to serial device. We connected a Raspberry Pi Pico.

2. Make a note of the assigned COM port via the notification pop up.

3. Left click on “Show Hidden Icons and then right click on the Serial Port Notifier icon.

Serial Port Notifier

4. Select the correct COM port and click Rename.

Serial Port Notifier

5. Enter a custom name for the device and click Ok to save.

Serial Port Notifier

6. The COM port is now identified using our preferred name.

Serial Port Notifier

Creating Custom Launchers

Serial Port Notifier has a neat feature, launchers. We can create custom launchers to open certain applications, or perform actions. These launchers work across all connected devices and are useful for common applications such as PuTTY. 

We are going to create a launcher to start PuTTY, a terminal emulator which we can use to control and communicate a device.

1. Left click on “Show Hidden Icons and then right click on the Serial Port Notifier icon.

2. Click on Settings.

Serial Port Notifier

3. Click on New to create a new launcher.

Serial Port Notifier

4. Label the launcher “PuTTY”.

Serial Port Notifier

5. Click on the … icon and navigate to the PuTTY.exe file . Our PuTTY file was located in Program Files > PuTTY.

Serial Port Notifier

6. For Command Line, enter the following to open PuTTY with specific connection details. Click Ok to save. This line will set the baud rate (connection speed), 8 data bits, (n) no parity, 1 stop bit and (N) no flow control.

Serial Port Notifier

7. Click Ok to save and close the Settings dialog.

Serial Port Notifier

8. Go back to the Serial Print Notifier and select the correct COM port, then click on the launcher.

Serial Port Notifier

PuTTY will launch and be ready for use with your USB serial device.

Serial Port Notifier

Les Pounder is an associate editor at Tom's Hardware. He is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training program "Picademy".

Microsoft is switching RAM speed units in Task Manager — finally moving to the more technically correct MT/s

Windows 11 24H2 will enable BitLocker encryption for everyone — happens on both clean installs and reinstalls

Dell XPS 16 laptops may finally use AMD CPUs — major leak reveals Dell's 2027 roadmap

  • Soaptrail What are some examples of people needing this? Reply
  • RuiFPB Thank you. This was very usefull. I use my Pi Zero 2 on a USB adapter board, and this made it easier to connect using serial Reply
  • View All 2 Comments

Most Popular

windows com port assignment

  • Select your search:
  • Search Site
  • Search Products

How to change asynchronous serial COM port assignments in Windows Device Manager

Twitter

Sealevel recommends using the installed COM numbers if at all possible to avoid system conflicts. If you previously installed a USB or PCMCIA serial interface, it will have resources assigned by the operating system. If the device is not currently connected to your computer, these COM assignments will not be apparent and forcing new COM port assignments will create a conflict when the devices are reconnected at a later time.

One scenario where you would have to change the COM port assignments is when your legacy application only works at COM1 through COM4 and the Sealevel serial device you installed comes in at COM5 or higher. Another scenario might occur when you install a multiport serial card and the COM port numbers are not assigned consecutively and you want them to appear consecutive.

In Windows 7, Vista, XP or 2000 operating systems, you can change the COM number assignment using Windows Device Manager.  To change the COM port assignments in Device Manager, follow these basic steps:

1) Click the Start button.

2) Right-click on My Computer.

3) In the fly-out menu, click Manage.

4) In the Computer Management Window, click on Device Manager.

windows com port assignment

5) In the right-hand pane, expand the Ports (COM & LPT) listing by clicking the “+” symbol.

windows com port assignment

6) Right-click on the COM number you want to change and select Properties from the fly-out menu.

windows com port assignment

7) In the Communications Port Properties window, click the Port Settings tab and then click the Advanced button.

windows com port assignment

8) In the Advanced Settings window, you can select the new COM port number from the drop box (be careful not to select a COM number already in use).

windows com port assignment

9) Click the OK button to confirm your changes. If Windows detects a conflict, choose another COM port number.

windows com port assignment

10) Click the OK button to close the Communications Port Properties window.

11) When Device Manager refreshes the hardware list, the COM assignment will reflect your changes. To get Device Manager to refresh the window on Windows XP, you may need to click ‘Action’ in the menu and then click ‘Scan for hardware changes’ in the sub-menu (Note: If ‘Scan for hardware changes’ isn’t listed in the sub-menu, click on the computer name in the right pane and then repeat this step).

windows com port assignment

Contact our technical support department if you are still experiencing problems with serial COM port assignments.

  • Computer Trends
  • Design Insights
  • Engineering for Industry
  • Manufacturing Advances
  • Sealevel Spirit
  • Automation & Control
  • Autonomous & Unmanned Systems
  • Military & Aerospace
  • Public Safety
  • Smart Cities
  • Transportation
  • Accessories
  • Digital & Analog I/O
  • Embedded Computing
  • Industrial IoT
  • MIL-STD 1553
  • USB Hubs & Isolators
  • Quickstart Guides
  • Media & Awards
  • Product Announcements
  • White Papers

Recent FAQs

  • What Modbus functions are supported by Sealevel products?
  • What is Modular Open Systems Approach (MOSA)?
  • What network speeds can SeaI/O Ethernet (SeaI/O-E) modules handle?
  • What are the advantages of using an advanced UART?
  • SeaMAC: ssiEncodingNone vs ssiEncodingNrz

Subscribe to our e-Newsletter

By continuing on this site, you agree to Sealevel’s Terms & Conditions and Privacy Policy Dismiss

Welcome to Sealevel!

We're glad you're here..

We would like to introduce you to the best international partner for all of your Sealevel needs.

  Windows OS Hub / Windows 10 / How to Clean Up or Reset COM Port Numbers in Windows

How to Clean Up or Reset COM Port Numbers in Windows

A number of legacy applications are able to address only two-digit COM port numbers, and won’t work with COM100 and higher. In the worst cases, these programs work only with COM1-COM9 ports. What if a device has got a higher COM port number?  Is it possible to reset the numbering for reserved COM ports and delete assigned ports?

How to Change a COM Port Number for a Device in Windows?

Find out which process is using a serial com port in windows, resetting com port numbers in windows registry.

In Windows, you can manually change the COM port number assigned to a device. Suppose the necessary COM port is already busy, and you want to try to free it.

  • Open the Device Manager by running the devmgmt.msc command;

Show Hidden Devices

  • Then expand Ports (COM & LPT) and find your device in the list;
  • Go to the Port Settings tab and click the Advanced button;
  • The current COM port number assigned to the device can be found in the COM Port Number field;

Change COM port assigment

But more often you cannot change the assigned COM port number to another one in the hardware properties, since all the “lower” COM ports are already in use.In this case, you need to try to remove the COM port reservation

  • Expand the Ports (COM & LPT) branch, find which COM port number you need is assigned to (a pale icon means that this COM port is assigned, but this device is not currently connected);

Uninstall COM device

Get-WMIObject Win32_SerialPort | Select-Object Name,DeviceID,Description You can get the COM port number for a specific device by its name, for example:

Get-WMIObject Win32_SerialPort | Where-Object { $_.Name -like "*Arduino*"}|select name, deviceid or Get-WMIObject Win32_SerialPort | Where-Object { $_.Name -like "*GPS*"}|select name, deviceid

You won’t be able to release the COM port of a device that is used by Windows or a running program (process). First, you need to stop the process that is currently using the COM port. You can use the Process Explorer tool (by Sysinternals) to find out the name of the process using a particular COM port number ( https://docs.microsoft.com/en-gb/sysinternals/downloads/process-explorer ).

First, you need to display the name of the service that uses the COM port. Run the PowerShell command:

get-pnpdevice -class Ports -ea 0| Select Name, PNPDeviceID, Status, Service

powershell - get com port service name

The service name of the specific COM port is shown in the Service column. For example, for COM2 it is Serial . Now you need to run Process Explorer as an administrator and select Find -> Find Handle or DLL from the menu. In the Handle or DLL substring line, enter the Service value obtained earlier. In our example, this is Serial .

Process Explorer should show the process name that is currently using your COM port. To release the COM port, kill the process or program.

process explorer - getting process name is using serial com port number

Information about the COM ports in use is stored in CommDB registry parameter under the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\COM Name Arbiter reg key.

COM Name Arbiter

  • Unplug all external devices and restart your computer;
  • After the reboot, connect the devices in the necessary order, reinstall USB-to-serial converters, etc. All detected COM port devices will be automatically detected by the system and assigned sequential COM port numbers.

You can also use the following free tools to clean up reserved COM ports:

com name arbiter reset tool to reset com port number assignment

  • Device Cleanup Tool – the utility is used to search the registry for previously connected devices (under the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum ), remove unused devices, and clear COM port reservations.

Mailbox Size and Quotas in Exchange 2019/2016 and Microsoft 365

Can’t access shared folders or map network drives from windows 10 and 11, related reading, create a multi-os bootable usb flash drive with..., read, modify, and parse json file (object) with..., configure dns scavenging to clean up stale dns..., how to read outlook emails with powershell, hide library and special folders from file explorer....

' src=

Hi dear When I open Device Manager there is no branch of (COM & LPT) to expand. How can I Add or Find it?

' src=

thank you so much

' src=

thanks you so much , life saving post 🙂 , i mostly work with iot devices and sometime com ports get busy and am getting com port busy returns in code so this saved my life in flushing com port

' src=

Thank you for the post, very helpful

Leave a Comment Cancel Reply

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Current ye@r *

Leave this field empty

Impressum

windows com port assignment

FvHemert (Customer) asked a question.

I have CP210x USB to UART Bridges installed on a Win10 computer. One is assigned COM3, the other one COM8. After a reboot the com ports are swapped and the connected devices no longer work.

Is there any way to fix the com port assignment?

I found several articles on this topic, also on the forum. They have dead links or do not apply to WIN 10.

windows com port assignment

M880586414 (Employee)

 According to experience before, the Windows assign the COM port according VID, PID and serial number. So with the same device plug in, it should always get same COM port assignment. However, two devices with same VID, PID and serial number might be treated as same device. When you plug in them in sequence, Windows can assign different COM port for them. However, after rebooting the Windows with the two USB devices attached, the COM port assignment should be decided by Windows for the two USB devices with same VID, PID and serial number. 

windows com port assignment

C836205753 (Employee)

Hi @FvHemert,

Windows manages the COM port number assignments, and a device's COM port number may change after a reboot.

To manually change the COM port number of a device:

1. Open Windows Device Manager > right click the device > Properties

b3550740-81ce-4f79-8250-370f08abc58b.png

2. Under Port tab > Advanced

cd5a3804-4de5-455f-ac23-915f799f7278.png

3. Change COM port number

c2800139-469d-45d4-aab9-e78b7fcc1c24.png

FvHemert (Customer)

Hi Stephen,

Thank you for your answer, I understand how to change the com port for a device.

This however is not my problem.

Just like in you screen shot I have 2 devices configured:

 - Serial device A on com8

 - Serial device B on com3:

The problem is that as soon as I reboot my machine Device A will be on com3 and Device B on com 8 and nothing works anymore because device A and B are totally different and controlled by different programs.

My question: how do I configure a static assignment so Device A will always stay on com 8 and Device B on com3? Regardless reboot or power down?  I am using Windows 10.

Hi @FvHemert

As I mentioned, Windows manages the COM port number assignments, and a device's COM port number may change after a reboot. I am not aware of any way to make an assignment static through a reboot.

windows com port assignment

cgiga (Employee)

Can you try using the AN721 software to view the contents of the CP210x devices?  In particular take a look at the serial number of the devices?  If they are the same, can you try changing the serial number of one of the devices and see if the com port assignments stay as originally defined after plugging them back in?

http://www.silabs.com/products/Interface/Pages/interface-application-notes.aspx

windows com port assignment

JH (Employee)

Which device are you using, CP2102/3/4/5/8? Do your two devices have same serial number?

If not reboot your machine, just remove the device and then plug it into USB port again, is the COM port number same as before?

Thanks for getting back to me. I am currently on a business trip and do not have access to the devices.

Will test and report back as soon as I am back home again.

windows com port assignment

H515662839 (Customer)

Can you clarify if your question refers to having your COM ports also re-enumerated after a reboot?

If yes, what Windows 10 update you're referring to that may be the problem?

And what Windows 10 version was working for you, at least in the sense you did not notice the COM ports re-assigned, but that remained relatively static?

No Additional Details

Share This Topic

Related questions, trending topics.

  • Machine Learning 7

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

How to view serial COM ports but not through Device Manager

How would I go about viewing a list of COM ports in use without the use of Device Manager ?

I don't want to install any software either. Is there a possible way to do this through the command line?

  • command-line
  • serial-port

Peter Mortensen's user avatar

  • Please better define "In Use". installed as a device? Has a device attached to it? Is actively transferring data? –  Ƭᴇcʜιᴇ007 Nov 4, 2014 at 16:33
  • @Ƭᴇcʜιᴇ007 sorry, in use would be having a device attached to it. I have a ttl uart cable plugged into a USB. –  Marmstrong Nov 4, 2014 at 16:36
  • I suppose you can do this through a powershell script. Why can't you use device manager? Your unwillingness to use something like Putty is odd. –  Ramhound Nov 4, 2014 at 16:48
  • 1 @Ramhound Using a University PC which has the device manager locked down to stop people like me fiddling. I can see that the device is COM3 on my laptop. I want to use Putty but I don't know which COM port to use. –  Marmstrong Nov 4, 2014 at 16:50
  • 2 @Marmstrong In the command prompt use mode . Used without parameters, mode displays all the controllable attributes of the CON (console) and the available COM devices (and LPT as well) –  JosefZ Nov 5, 2014 at 0:51

7 Answers 7

In the command prompt use

Used without parameters, mode displays all the controllable attributes of the CON (console) and the available COM devices (and LPT as well).

Accepts /? switch for basic help:

JosefZ's user avatar

  • 3 Using mode most of the time I don't see the devices that are not connected, as mentioned in @G-M 's answer. –  sylvainulg Mar 6, 2019 at 14:14
  • mode is for configuring system devices. This does work... until I connect something like Putty to the COM port. Which I guess makes sense, it the port is not configurable while in use. A better "query only" method is in @lithiumhead's answer. –  Percy Blanket Dec 9, 2021 at 17:12

I know the question has been answered, but this is another method.

In command prompt, use: chgport in windows Vista and up. Lists your ports and which device they are.

Thomas Larsen's user avatar

  • 2 Windows 7 "'chgport' is not recognized as an internal or external command, operable program or batch file." –  DavidPostill ♦ Nov 25, 2016 at 13:58
  • 6 works for me on Win 7 –  woky Feb 24, 2017 at 8:07
  • 1 chgport Applies To: Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012 . –  JosefZ Mar 6, 2019 at 15:28
  • 3 chgport also works in Windows 10 –  spikey_richie Mar 7, 2019 at 13:22
  • 3 Did not work for me. I get Unable to get list of COM ports, error code = 0x5. No serial ports were found. Windows 10 Enterprise, 20H2 –  Percy Blanket Dec 9, 2021 at 17:12

In the command prompt use:

In PowerShell, run as administrator :

Or, for raw data:

Hope this helps.

Nick Bolton's user avatar

  • 6 The command prompt returned No Instance(s) Available. –  Marmstrong Nov 4, 2014 at 16:46
  • If there are no Com port devices detect then the command results "No Instance(s) Available". Check your "Device Manager" and ensure your machine detected the Com ports in "Device Manager" –  BDRSuite Nov 4, 2014 at 16:53
  • OP said "Using a University PC which has the device manager locked down" –  DavidPostill ♦ Nov 4, 2014 at 16:54
  • @vembutech - Looks like you will need to get IT involved in that case. –  Ramhound Nov 4, 2014 at 16:56
  • @vembutech I have checked the device on my own laptop and it appears as COM3 in device manager but the command prompt still shows the same result. –  Marmstrong Nov 4, 2014 at 16:56

You can also run the following from cmd.exe prompt

And here is an open source utility to do the same and more: https://todbot.com/blog/2012/03/02/listcomports-windows-command-line-tool-for-usb-to-serial/

lithiumhead's user avatar

  • Thanks! This actually worked. –  Mooncrater Sep 2, 2020 at 5:50

Using mode most of the time I don't see the devices that are not connected.

I prefer to use this solution with Python:

So I can see anything plugged in even if the connection is closed.

serial.tools.list_ports is from package pyserial .

MartyMacGyver's user avatar

  • idk when this worked, but now the __repr__ of the objects has changed and I get [<serial.tools.list_ports_common.ListPortInfo object at 0x00000000036ECCC8>, <serial.tools.list_ports_common.ListPortInfo object at 0x00000000036ECD88>] –  Jason S Dec 10, 2020 at 19:13
  • 1 looks like you need the description or device properties now: python -c "import serial.tools.list_ports as ls;print [p.device for p in ls.comports()]" –  Jason S Dec 10, 2020 at 19:16

wmic https://docs.microsoft.com/en-us/windows/desktop/wmisdk/wmic is a windows command line utility to get system information.

If your serial port is virtual created by some driver through USB connection, use this example to get details about these serial ports.

GLampros's user avatar

  • a bit of further information would be helpfull –  Albin Nov 16, 2018 at 17:55
  • that produces lots of information. get Name instead of get /value might help. Unfortunately, it won't simply list ports, but strings such as "USB Serial Port (COM17)". There are also multiple entries mentioning simply "USB Serial Converter" on my setup. –  sylvainulg Mar 6, 2019 at 14:22

The snippet below lists serial ports into the $PORTS variable

Dan Henderson's user avatar

  • What I like about this answer is that I can use it within a bash script. –  fearless_fool Oct 9, 2020 at 21:02

You must log in to answer this question.

Not the answer you're looking for browse other questions tagged command-line serial-port com-port ..

  • The Overflow Blog
  • Why do only a small percentage of GenAI projects actually make it into...
  • Spreading the gospel of Python
  • Featured on Meta
  • Our Partnership with OpenAI
  • Imgur image URL migration: Coming soon to a Stack Exchange site near you!

Hot Network Questions

  • Why would a transforming vehicle gain\lose access to its primary weapon when it mode switches?
  • Which comma(s) can I remove in this sentence? I feel like there are too many here but all seem necessary to me
  • Which cognitive psychology findings are solid, that I can use to help my students?
  • Water in attic AC air handler pan
  • Hash as filename to protect data
  • Connected set in a filled Julia set
  • Urban fantasy book about a female monster hunter/investigator
  • How far can you push Object Oriented Programming?
  • Author claims that for an ideal gas dU/dV=0
  • What are some good modern-era books on Hilchos Shabbos in Hebrew?
  • Prenex Normal Form of a Simple Proposition Reads Strangely.
  • C standard input escape sequence replacer program
  • Fantasy novel in which one of the main characters was a soldier in an army that would lay a large ladder over a chasm in order to attack the enemy
  • Why is Outlook Formatting this Column Header into text wrapped (2 lines) when pasting from Excel and how can I stop it?
  • How can I separate curve from profile using Geometry Nodes?
  • Regarding generic reply from professor
  • As 'beiseiteschieben' did not officially exist before 2006, why do we treat this (official) new form as primary and call it a "separable" verb?
  • Multilevel party. Balancing encounters
  • What would one use a theory of quantum gravity for?
  • How did White lose all their pieces?
  • Did Poincaré ever made mistakes in the books or papers he published?
  • Hodge decomposition of smooth n-forms: is it an isomorphism of topological vector spaces?
  • Conservation of momentum in Newton's cradle
  • For what kind of distributions, the joint distribution could be determined uniquely by marginal distribution and correlation?

windows com port assignment

Home > News Tips

[Solved] How to Change or Switch Disk Numbers in Windows

Updated on Monday, May 13, 2024

iBoysoft author Jessica Shee

Change Disk Numbers in Windows: Switch disk 0 and disk 1

When your hard drive is detected and recognized, Windows will assign your drive a letter and a numeric disk ID to better identify a certain disk. You can use Disk Management to change a drive letter if you don't like the assigned drive letter or if you have a drive that doesn't have a drive letter yet.  How to change disk numbers in Windows ?

This article will introduce how disk enumeration works in Windows and tell you  how to change disk ID of a drive , especially  switch disk 0 and disk 1 . 

How does Windows assign drive numbers?

The location of the SATA port on the motherboard that a drive is plugged into determines the disk number of that drive. Some motherboards have markings right on the board that let you know what port corresponds to what number.

list disk number using diskpart in Windows

In other words, the number assigned to your  SSD ,  HDD , or other storage devices, also known as disk ID, is the physical address of a SATA port. You can set up a boot order for all SATA ports in BIOS, and then Windows decides master and slave drives by your BIOS boot order. 

By default, the first hard drive with a Windows OS will be assigned as C: and Disk 0 in Disk Management because it needs to boot up first. Then other devices will be given disk numbers 1, 2, 3, etc. 

However, the story is different for an  M.2 SSD  with NVMe. Drives connected to SATA ports get priority in numbering order. Therefore, even though your NVMe SSD is the boot drive, it always goes by the last number because it is connected to an M.2 slot. It will display in Disk Management shown below. This is no solution to change the disk number for an NVMe SSD in Windows and nothing to worry about.

  • NVMe = Disk 2 (C: )
  • SATA1 = Disk 0 (D: )
  • SATA2 = Disk 1 (E: )

Is this information helpful? If you nod, please share it. 

Why do you need to change disk numbering? 

There is usually no need to alter disk numbers because they just signify different physical connections on a motherboard. But one situation is an exception - when your startup disk (not an NVMe SSD) which contains a Windows operating system is not listed as disk0. 

Here is an example from the Superuser forum:

A desktop system had two drives (Assigned C and D, which were enumerated in Disk Management as Disk 0 and Disk 1). A new SSD was added as the boot drive, after copying the C drive to the SSD. The SSD was connected to SATA 0 (master) port on the motherboard. The previous C Drive was moved to SATA 2 and is reformatted as a non-booting NTFS partition. The D drive remained on SATA 1.... However, the list in Disk Management is re-ordered. Disk 0 is the previous Disk 2 (D Drive) on SATA 1, Disk 1 is the new Boot Drive (now C) on SATA 0, and Disk 2 is the former C Drive (now assigned E) on SATA 2...Is there any way to re-order the Disk number assignments? What actually does determine the Disk number enumeration?

In this case, after the user added a new boot drive to the SATA 0 port, the boot drive was not assigned the corresponding disk0 but disk1. The user wanted to switch disk1 to disk0. 

Can you change disk ID numbers?

The response is a clear negative if you mean that you wish to alter the physical SATA port order on your motherboard. The precise placements or enumeration of these ports cannot be changed.

However, if you want to change the disk numbering of the slave hard drives or assign the boot drive with the correct order which is disk0, it is possible to do so.

Thanks for sharing in advance.

How to change disk numbers in Windows?

There is no need to mess with the disk numbers for average users because it is not easy. You can read the following advice if you have a good cause to.

How to change the disk number of the boot drive from disk1 to disk0:

  • Back up data of the current boot drive.
  • Reformat the current boot drive to a Windows format - NTFS, FAT, or exFAT. 
  • Reinstall Windows OS to the drive you want to use as a boot drive.
  • Go to BIOS and set up the new boot drive as the first drive to boot. Then the new boot drive will be disk0.

How to change the disk numbers of other slave drives:

  •  Unplug all secondary drives, also known as slave drives, that don't contain the operating system. 
  •  Connect the drives to your Windows PC in a different order. Then you will find the disk IDs of these disks have changed. 

This article helps you understand how disk number enumeration works and if you can change the disk ID of a drive. As long as everything seems fine, most users won't need to change disk numbers or be concerned if the boot drive is not Disk 0.

Your friends may be happy to see this article too. 

Jessica Shee is a senior tech editor at iBoysoft. Throughout her 4 years of experience, Jessica has written many informative and instructional articles in data recovery, data security, and disk management to help a lot of readers secure their important documents and take the best advantage of their devices.

No. 308, 3/F, Unit 1, Building 6, No. 1700, Tianfu Avenue North, High-tech Zone

Copyright© 2024 iBoysoft ® . All Rights Reserved.

DMCA.com Protection Status

IMAGES

  1. how to assign static COM port number to a device

    windows com port assignment

  2. How to Check Which Ports Are in Use in Windows 10

    windows com port assignment

  3. Как настроить виртуальный com порт windows 10

    windows com port assignment

  4. Identify the serial COM port

    windows com port assignment

  5. How to Determine What Ports are Being Used in Windows 10

    windows com port assignment

  6. Служба com портов windows 10

    windows com port assignment

VIDEO

  1. Why is Windows in the C:/ Drive?

  2. Economic Concept Presentation By Port Management Student ( Assignment )

  3. How to remove VLAN assignment

  4. Build a Desktop Application in 40 Minutes

  5. English assignment tutorial on installing Windows Server

  6. Dbg3301: HyperDbg 04 04 Variables and Assignment

COMMENTS

  1. Configuration of COM Ports

    To ensure compatibility with most applications that access COM ports, you should assign a symbolic link name that uses the standard naming convention COM<n>, where <n> is the COM port number (for example, COM1). If you use a COM<n> name, you must obtain the COM port number <n> from the COM port database. COM port numbers should only be used ...

  2. windows

    4. I do not have to do this programmatically, so Nacereddine is right. My Computer -> Manage -> Device Manager -> Ports -> Communications Port -> Port Settings -> Advanced -> COM Port Number. My answer basically said the same thing, but without as much detail because the details depend on the driver. If you are going to accept your own answer ...

  3. How to check COM ports in Windows 10?

    Device manager has a thing "View Hidden Devices" You have to specifically select that before the Ports (COM & LPT) are even visible. The proper path to Device Manager is: Open RESOURCE EXPLORER (Win+E), right click on THIS COMPUTER, click on DEVICE MANAGER Anyway on my Windows 10 the number of each port is NOT shown here.

  4. Manage COM Port Assignment in Windows 10

    But, if you open up Device Manager, right-click on device, port settings, advanced. There's a number of settings, including the COM Port assignment. I quickly tested that assigning to 9, then moving around to different USB slots came up with same COM Port. As far as Regedit goes, you might check \HKLM\HARDWARE\DEVICEMAP\ - in my case ...

  5. COM ports Windows 10: fix any COM port issues in 2 easy ways

    One option is to find com port Windows 10 by following the steps below: Step 1: Open the Device Manager. Step 2: From the menu bar, click View. Step 3: Choose "Show hidden devices". Step 4: From the list of hidden devices, find the Ports (COM & LPT). Step 5: Expand the same menu ("+") to check for the missing COM ports.

  6. Change COM port via registry, command line or software?

    This changing is done in two below steps in the registry through the "regedit": In the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\XXX that XXX is your device name. You need to trace each item to find the FriendlyName and then change it as you wish (Ex: "USB Serial Port (6)"); In the previous key, again you need to trace the item to find ...

  7. windows

    However, changing COM port assignments programmaticly is not exactly considered a best practice. For example, what happens if two more more concurrent applications are fighting to get the same COM assignment? Windows dynamically assigns COM port numbers for a good reason. Ideally, your application should be written so that it searches for the ...

  8. How To Detect the COM Port for Any Serial Device in Windows

    3. Left click on "Show Hidden Icons and then right click on the Serial Port Notifier icon. (Image credit: Tom's Hardware) 4. Select the correct COM port and click Rename. (Image credit: Tom's ...

  9. COM Port Number Assignment in Windows

    Answer. Windows will assign a COM port number that is the next free COM port in the list. For example, if you attach a CP210x to a machine with three hardware COM ports and have never attached a CP210x or other virtual COM port prior, the CP201x will show up as COM4. From that point on, whenever a CP20x with the same VID, PID, and serial string ...

  10. PDF Re-Assigning COM Port Numbers Using the Windows Registry

    Right click on this saved file and select "Edit" to open the file, as shown in the figure below. Figure 5 - Edit the Registry File. In the FTDIUSB.reg file, modify the "FriendlyName" and "PortName" in the file for each port which needs to re-assigned. Figure 6 - Modifying the FTDIUSB.reg Registry File.

  11. How to change asynchronous serial COM port assignments in Windows

    To change the COM port assignments in Device Manager, follow these basic steps: 1) Click the Start button. 2) Right-click on My Computer. 3) In the fly-out menu, click Manage. 4) In the Computer Management Window, click on Device Manager. 5) In the right-hand pane, expand the Ports (COM & LPT) listing by clicking the "+" symbol.

  12. How to Clean Up or Reset COM Port Numbers in Windows

    Select View->Show Hidden Devices in the menu; Then expand Ports (COM & LPT) and find your device in the list; Go to the Port Settings tab and click the Advanced button; The current COM port number assigned to the device can be found in the COM Port Number field; To change it, open the drop-down list and select the COM port number you want to set.

  13. windows 10

    Note If using Windows 8/10, navigate: Right-click Start > Control Panel > In the search box, enter "Bluetooth" then select Change Bluetooth settings. From the COM Ports tab, click Add. Ensure that "Incoming (device initiates the connection)" is selected then click OK. Click OK. See how it is shown as connected in the bluetooth window:

  14. ComPortMan V1.1.9

    ComPortMan is a Windows service that gives control over Windows' COM port assignment for COM ports. Running as service makes it independent of the logged on user's privileges, so there is no need to give the users the privilege to change COM ports. You can define new default COM port numbers by several criteria.

  15. Reassign COM port numbers in Windows

    To reassign a COM port number in Windows, perform the following steps: 1) Right-click My Computer and left-click Properties. 2) Select Device Manager. 3) Under the Ports heading, right-click on the COM port you would like to change (for example, Silicon Labs CP210x USB to UART Bridge) and select Properties. 4) Select the Port Settings tab.

  16. COM port assignement changes after reboot

    Windows manages the COM port number assignments, and a device's COM port number may change after a reboot. To manually change the COM port number of a device: 1. Open Windows Device Manager > right click the device > Properties . 2. Under Port tab > Advanced . 3. Change COM port number

  17. How to view serial COM ports but not through Device Manager

    python -c "import serial.tools.list_ports as ls; print([p.device for p in ls.comports()])" So I can see anything plugged in even if the connection is closed. serial.tools.list_ports is from package pyserial.

  18. [Solved] How to Change or Switch Disk Numbers in Windows

    Change Disk Numbers in Windows: Switch disk 0 and disk 1. When your hard drive is detected and recognized, Windows will assign your drive a letter and a numeric disk ID to better identify a certain disk. You can use Disk Management to change a drive letter if you don't like the assigned drive letter or if you have a drive that doesn't have a ...