devcon disable cannot disable device not found
Asked Answered
C

5

16

I'm on Windows 8.1 trying to disable my clickpad programatically. I've installed the correct x64 bit version of devcon as noted here. I can find the correct device but devcon disable with the same parameters fails.

PS C:\...\7600.16385.win7_wdk.100208-1538\tools\devcon\amd64> .\devcon.exe disable 'ACPI\SYN1ECA*'
ACPI\SYN1ECA\4&22077A96&0                                   : Disable failed
No matching devices found.

Which is rather confusing. It obviously finds the right device, but then reports "No matching devices found". What the heck?

Please note that I am aware of this similar question but, in addition to not having an accepted answer, that question has a different error and is likely using the wrong version of devcon.

Corinnecorinth answered 2/1, 2015 at 4:5 Comment(0)
G
15

No Matching Devices is the way that windows tells you that it cannot find or access the devices you are looking for. There can be a couple of causes for this:

  1. Incorrect Permissions caused by not running the command prompt/BAT as an administrator. Simply right-click the relevant access method and select 'Run as administrator"
  2. Incorrect Access caused by running the wrong version of devcon.exe. As a remnant of the shift to 64 bit computer there are two version of devcon located in the 'Tools' folder, one for x86 and one for x64, ensure that you are running the correct version for your computer and you should be able to perform your tasks without issue.
Globin answered 21/9, 2015 at 22:36 Comment(1)
I was running the 32 bit version on 64 bit windows and it failed, changing it succeeded - you can download the correct version for your OS here: superuser.com/questions/1002950/…Serle
O
7

You are using the wrong "spelling" in your command.

This should work:

devcon.exe disable "ACPI\SYN1ECA*"

If you already found the exact device you want to disable you can do it like this:

devcon.exe disable "@<instace ID>"

In your case:

devcon.exe disable "@ACPI\SYN1ECA\4&22077A96&0"

If this also doesn't work you should use the remove command. remove works almost always, but the device will be back after you restart the system.

devcon.exe remove "@<instance ID>"
Overgrow answered 8/3, 2015 at 16:46 Comment(0)
A
2

No matching devices found. is a confusing way for devcon to tell that you are running the command without elevation. This is without elevation:

devcon restart "PCI\VEN_10EC&DEV_8168&SUBSYS_85051043&REV_09"
PCI\VEN_10EC&DEV_8168&SUBSYS_85051043&REV_09\4&21A1C3AE&0&00E5: Restart failed
No matching devices found.

This is with elevation:

devcon restart "PCI\VEN_10EC&DEV_8168&SUBSYS_85051043&REV_09"
PCI\VEN_10EC&DEV_8168&SUBSYS_85051043&REV_09\4&21A1C3AE&0&00E5: Restarted
1 device(s) restarted.

To elevate right click on command prompt and select "run as administrator".

Ascertain answered 25/3, 2015 at 9:0 Comment(3)
Thanks, but this is in an admin shellCorinnecorinth
Tried running as administrator. Made sure its 64bit version from amd64 folder. But disabling Synaptics Touchpad did not work. Is anyone else facing the problem ?Banana
Status works, but restart doesn't. From an administrator command prompt: C:\devcon.exe status "@ACPI\LEN0036*" ACPI\LEN0036\4&110B26F5&0 Name: Synaptics Pointing Device Driver is running. 1 matching device(s) found. C:\devcon.exe restart "@ACPI\LEN0036*" ACPI\LEN0036\4&110B26F5&0 : Restart failed No matching devices found.Pail
D
0

Look at superuser question

Resume:

To download correct version devcon x86/x64. Run the devcon commands in cmd.exe with administrative privileges

To block/unblock:

USB\VID_1C4F&PID_0002&MI_01\6&1578F7C2&0&0001   : USB storage device

%windir%\system32\devcon.exe disable *VID_1C4F*
and
%windir%\system32\devcon.exe enable *VID_1C4F*

Sometimes devcon does not disable:

USB\VID_1C4F&PID_0002&MI_01\6&1578F7C2&0&0001 : Disabled
HID\VID_1C4F&PID_0002&MI_00\7&2B89365C&0&0000 : Disable failed

In this case, the only solution is replace the command: "disable" by "remove":

%windir%\system32\devcon.exe remove *VID_1C4F*

HID\VID_1C4F&PID_0002&MI_00\7&2B89365C&0&0000 : Removed
1 device(s) were removed.

But devcon is not a permanent solution for locking and unlocking devices. The test is that you can lock a usb device and then run bash script renewusb_2k.bat, and you will see that the script reinstall the usb drivers again and the locked usb device becomes accessible again.

Deemphasize answered 2/12, 2016 at 23:30 Comment(0)
M
0

Programmatic approach in Python. What ended up working for me as well was of course Running as Administrator my app and the remove device(s) / rescan trick:

       DevConFX3Regex = re.compile(r'(?P<device_id>USB[^\s]*)\s+ : FX3')
       DevConCOMRegex = re.compile(r'(?P<device_id>[^\s]*)\s+ : .*\(COM[0-9]{1,3}\).*')

       def auto_repair_usb_com_ports(self):
          os.system('devcon findall * > DevCon.txt')
          
          with open('DevCon.txt', 'r') as devcon_text:
             devcon_text = devcon_text.read()
             
          for match in self.DevConFX3Regex.finditer(devcon_text):
             device_id = match.group("device_id")
             print(device_id)
             device_id = f'"@{device_id}"'
             os.system(f'devcon remove {device_id}')
             
          for match in self.DevConCOMRegex.finditer(devcon_text):
             device_id = match.group('device_id')
             device_id = f'"@{device_id}"'
             os.system(f'devcon remove {device_id}')
             
          os.system('devcon rescan')
Millisecond answered 10/11, 2022 at 21:48 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.