Loading
2014.12.31 15:45 - 영엑스에프에프

devcon 사용법(안쓰는 COM포트 제거)

목적 : COM포트 넘버가 2^12 개를 초과하면 더이상 COM포트 생성이 안됨. 이때 사용하지 않는 컴포트를 제거하기 위함.


방법 : 

1. 아래를 다운로드 후 압축해제.

Remove unused comports.7z

2. 관리자 권한으로 명령프롬프트 실행

3. devcon findall *VID_2341* > ports_data.txt   하면 ports_data.txt 파일이 생성됨.

    (VID_2341은 아두이노 VID)

4. RemoveComports.exe 실행.



참고사이트 :

1.http://msdn.microsoft.com/en-us/library/windows/hardware/ff544796(v=vs.85).aspx




DevCon Remove

Removes the device from the device tree and deletes the device stack for the device. As a result of these actions, child devices are removed from the device tree and the drivers that support the device are unloaded.

This operation does not delete the device driver or any files installed for the device. After removing the device from the device tree, the files remain and the device is still represented internally as a nonpresent device that can be reenumerated.

Valid only on the local computer.

    devcon [/r] remove {* | ID [ID ...] | =class [ID [ID ...]]} 

   

Parameters

 /r

Conditional reboot. Reboots the system after completing an operation only if a reboot is required to make a change effective.

*

Represents all devices on the computer.

 ID

Specifies all or part of a hardware ID, compatible ID, or device instance ID of a device. When specifying multiple IDs, type a space between each ID. IDs that include an ampersand character (&) must be enclosed in quotation marks.

The following special characters modify the ID parameter.

Character Description

*

Matches any character or no character. Use the wildcard character (*) to create an ID pattern, for example, *disk*.

@

Indicates a device instance ID, for example, @ROOT\FTDISK\0000.

'

(single quote)

Matches the string literally (exactly as it appears). Precede a string with a single quote to indicate that an asterisk is part of the ID name and is not a wildcard character, for example, '*PNP0600, where *PNP0600 (including the asterisk) is the hardware ID.

 

 =class

Specifies the device setup class of the devices. The equal sign (=) identifies the string as a class name.

You can also specify hardware IDs, compatible IDs, device instance IDs, or ID patterns following the class name. Type a space between each ID or pattern. DevCon finds devices in the class that match the specified IDs.

Comments

The system might need to be rebooted to make this change effective. To have DevCon reboot the system, add the conditional reboot parameter (/r) to the command.

Sample Usage

devcon /r remove "PCI\VEN_8086&DEV_7110" 
devcon /r remove =printer
devcon /r remove =printer *deskj*


'개발관련_기타' 카테고리의 다른 글

devcon 사용법(안쓰는 COM포트 제거)  (0) 2014.12.31

댓글을 입력하세요