Article ID: 819036
Article Last Modified on 2/27/2007
APPLIES TO
- Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
- Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
- Microsoft Windows Server 2003, Standard Edition (32-bit x86)
- Microsoft Windows Server 2003, Web Edition
- Microsoft Windows XP Professional
- Microsoft Windows XP Home Edition
- Microsoft Windows 2000 Server
- Microsoft Windows 2000 Advanced Server
- Microsoft Windows 2000 Professional Edition
IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986 Description of the Microsoft Windows Registry
IN THIS TASK
SUMMARY
This article describes the COMDisable tool. It also contains examples that illustrate how to use COMDisable to do the following:
- View a list of available COM ports on your computer
- Disable and enable these COM ports
To download and install the COMDisable tool, visit the following Microsoft Web site:
Overview
With the COMDisable tool, you can view a list of available COM ports on your computer. You can also disable or enable the COM ports on your computer without manually editing the registry.
You can use COMDisable in situations when Windows Server 2003 incorrectly detects a serial device that is connected to your computer. For example, in certain situations, a serial device, such as a Global Positioning System (GPS) device, may be incorrectly detected by Windows as a serial mouse. To work around this issue, you can edit the registry and add an entry for the port where the device that is incorrectly detected by Windows is connected.
Note The symptoms that COMDisable is designed to address may also have other causes that cannot be addressed by COMDisable. In particular, when using certain USB-to-serial adapters, the adapter itself may attempt to detect whether a serial mouse is attached and it may emulate a USB mouse rather than a serial port. This may cause problems if the attached serial device is not actually a mouse. This behavior is a function of the USB-to-serial adapter hardware, and is not controlled by Windows or the COMDisable tool. You can determine if this is happening by looking at Device Manager. If the USB-to-serial adapter is not displayed Ports (COM & LPT) section and is displayed in the Human Interface Devices section. This means the USB-to-serial adapter is emulating a USB mouse. Please contact the manufacturer of the device for more information. This behavior has been confirmed to occur with the Belkin F5U409 USB-Serial adapter. There may be other adapters that behave in this manner as well.
For additional information about this issue and the workaround, click the following article number to view the article in the Microsoft Knowledge Base:
283063 Serial Device May Be Detected as a Serial Mouse in Windows 2000
However, with the COMDisable tool, you do not have to manually edit the registry. When you use COMDisable to list the COM ports that are available on the computer and then to specify the port number and operation that you want to perform, COMDisable modifies the appropriate registry entry for you.
back to the top
Operating System Requirements
COMDisable is supported on computers that are running the following operating systems:
- Windows Server 2003
- Microsoft Windows XP
- Microsoft Windows 2000 Service Pack 3 (SP3) or later
COMDisable Syntax
COMDisable uses the following syntax:
comdisable /list
comdisable /disable COMPortNumber
comdisable /enable COMPortNumber
Examples
Disable a COM Port
In situations when Windows incorrectly detects a serial device that is connected to your computer, use the COMDisable tool to display a list of the COM ports on your computer and then to disable the COM port where the device that is incorrectly detected by Windows is connected. To do so, follow these steps:
- Determine the COM port number where the device that is incorrectly detected by Windows is connected.
View the list of the available COM ports on the computer. To do so, type the following line at the command prompt, and then press ENTER:
comdisable /list
A list of the COM ports on your computer and their status is displayed. For example, you may receive output similar to the following:
COM1 - (Standard port types) - Communications Port (COM1) - Currently enabled COM2 - (Standard port types) - Communications Port (COM2) - Currently enabled
- Verify that the COM port (where the device that is incorrectly detected by Windows is connected) is displayed in the list that you viewed in step 2. Also verify that the status of the port is displayed as "Currently enabled."
- Disable the COM port. To do so, type the following line at the command prompt, where
PortNumber
is the number of the COM port that you want to disable, and then press ENTER:comdisable /disable COM
PortNumber
For example, to disable COM port 2, type the following, and then press ENTER:
comdisable /disable com2
You receive the following message:
- Restart the computer.
Enable a COM Port
To enable a COM port, follow these steps:
- View the list of the available COM ports on the computer. To do so, type the following line at the command prompt, and then press ENTER:
comdisable /list
- Type the following line at the command prompt, where
PortNumber
is the number of the COM port that you want to enable, and then press ENTER:comdisable /enable COM
PortNumber
For example, to enable COM port 2, type the following, and then press ENTER:
comdisable /enable com2
You receive the following message:
- Restart the computer.
Keywords: kbdownload kbhowtomaster kbinfo KB819036