Microsoft KB Archive/819036

= Overview of the COMDisable Tool =

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 

Overview

 

Operating System Requirements

 

COMDisable Syntax

 

Examples

 Disable a COM Port Enable a COM Port</li></ul> </li></ul>

<div class="summary_section">

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:

http://download.microsoft.com/download/b/2/6/b2624690-0fdc-4842-b850-8d21ca893962/COMDisable.msi

back to the top

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

back to the top

COMDisable Syntax
COMDisable uses the following syntax:

comdisable /list

comdisable /disable COM 

comdisable /enable COM 

back to the top

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: <ol> Determine the COM port number where the device that is incorrectly detected by Windows is connected.</li>  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: <pre class="fixed_text">COM1 - (Standard port types) - Communications Port (COM1) - Currently enabled

COM2 - (Standard port types) - Communications Port (COM2) - Currently enabled </li> 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 &quot;Currently enabled.&quot;</li> Disable the COM port. To do so, type the following line at the command prompt, where  is the number of the COM port that you want to disable, and then press ENTER:

comdisable /disable COM

For example, to disable COM port 2, type the following, and then press ENTER:

comdisable /disable com2

You receive the following message:

Port COM2 disabled, you need to reboot before the changes takes effect.

</li> Restart the computer.</li></ol>

back to the top

Enable a COM Port
To enable a COM port, follow these steps: <ol> 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.</li> Type the following line at the command prompt, where  is the number of the COM port that you want to enable, and then press ENTER:

comdisable /enable COM

For example, to enable COM port 2, type the following, and then press ENTER:

comdisable /enable com2

You receive the following message:

Port COM2 enabled, you need to reboot before the changes takes effect.

</li> Restart the computer.</li></ol>

back to the top

Keywords: kbdownload kbhowtomaster kbinfo KB819036

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.