Using Devcon.exe
I have found a copy of Devcon.exe it seems to work on Windows 7 X 64. I had hoped to use Devcon to disable and then immediately reenable the speaker on my headset (a Plantronics CS 50 USB). I need to do this programmatically to avoid the pain derived using the "Sounds" dialog to do the same thing slightly more than twice an hour. I used the .CMD file "speakers.CMD" which is as follows: Devcon disable "USB\VID_047F&PID_0410&MI_00" Devcon enable "USB\VID_047F&PID_0410&MI_00" The only problem was that Devcon wanted to wait until there was a system reboot! The exact output of the command was: =================================================== d:\>speaker d:\>Devcon disable "USB\VID_047F&PID_0410&MI_00" USB\VID_047F&PID_0410&MI_00\6&14AB3D07&0&0000 : Disabled on reboot The 1 device(s) are ready to be disabled. To disable the devices, restart the devices or reboot the system . d:\>Devcon enable "USB\VID_047F&PID_0410&MI_00" USB\VID_047F&PID_0410&MI_00\6&14AB3D07&0&0000 : Enabled 1 device(s) are enabled. ================ the emphasis above is mine ============ This was not at all what I wanted! Since the above.clearly, did not work; does anyone have an idea how I might accomplish what I so desperately need? Thanks, Steve Behman
April 15th, 2012 5:33pm

Hi Steve, What error message did you receive about the command? I would like to share the following articles with you. http://techlikes.com/2010/09/25/devcon-problem-in-windows-7-solved.html http://techlikes.com/2011/06/10/enabledisable-a-device-from-command-line-using-devcon-in-windows-7.html Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.Niki Han TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
April 16th, 2012 10:33pm

Niki, thanks for the reply. With your guidance. I was able to obtain an appropriate version of Devcon. From the headset's properties dialog in Device Manager I obtained the following Hardware IDs: USB\VID_047F&PID_0410&REV_2133&MI_00 USB\VID_047F&PID_0410&MI_00 From which I constructed the file "speaker.CMD" which reads: Devcon.exe disable "USB\VID_047F&PID_0410&MI_00" Devcon.exe enable "USB\VID_047F&PID_0410&MI_00" The following is a copy of the output when running Speaker.CMD: d:\Programs>speaker d:\Programs>Devcon.exe disable "USB\VID_047F&PID_0410&MI_00" USB\VID_047F&PID_0410&MI_00\6&14AB3D07&0&0000 : Disable failed No matching devices found. d:\Programs>Devcon.exe enable "USB\VID_047F&PID_0410&MI_00" USB\VID_047F&PID_0410&MI_00\6&14AB3D07&0&0000 : Enable failed No matching devices found. I have tried numerous syntactical variations but none of them seems to work. Any advice? Also, I haven't a clue where the underscored line in the command output comes from do you have any ideas about that? Again thanks, Steve Behman
April 17th, 2012 10:22am

Niki, I am using the February 8, 2010 version of Devcon.exe it seems to be the latest one. In addition to the command I posted previously, I have tried all variants of the use of "'" and "@", none of them worked. Below is the command I am attempting to use (with the above indicated variants). The Hardware ID was obtained from the "Properties" dialog for the device. ================= SPEAKER.CMD ============= Devcon.exe disable "'@USB\VID_047F&PID_0410&MI_00" Devcon.exe enable "'@USB\VID_047F&PID_0410&MI_00" =================================================== ================= Output When Running the Command ============== d:\>speaker d:\>Devcon.exe disable "'@USB\VID_047F&PID_0410&MI_00" No matching devices found. d:\>Devcon.exe enable "'@USB\VID_047F&PID_0410&MI_00" No matching devices found. ================================================= The above output is roughly the same for all of the variants I have tried. Apparently I am making a syntax error and have spent over 15 hours trying to make this work, the most helpful thing anyone can do at this point is to correct the above so that it works! Thanks,Steve Behman
Free Windows Admin Tool Kit Click here and download it now
April 18th, 2012 12:49pm

Niki, I continued my investigation following the procedure described in the second of the links you suggested. I believe I followed it exactly. This is what resulted: d:\>devcon find "USB\VID_047F&PID_0410&MI_00\6&14AB3D07&0&0000" No matching devices found. d:\>devcon find "@USB\VID_047F&PID_0410&MI_00\6&14AB3D07&0&0000" USB\VID_047F&PID_0410&MI_00\6&14AB3D07&0&0000 : CS50/CS60-USB Head set 1 matching device(s) found. d:\>devcon disable "@USB\VID_047F&PID_0410&MI_00\6&14AB3D07&0&0000" USB\VID_047F&PID_0410&MI_00\6&14AB3D07&0&0000 : Disable failed No matching devices found. d:\>devcon disable "USB\VID_047F&PID_0410&MI_00\6&14AB3D07&0&0000" No matching devices found. It appears that the use of the "@" changes the behavior of the "find" subcommand but does not affect the "disable" command, which, in no case, is similar to the "find" subcommand! All the above having been said, I am still a total loss in solving the problem. Again thanks,Steve Behman
April 18th, 2012 2:32pm

I think it's the chipset in the headset. How about trying a different brand, or unplug/plug in the headset?
Free Windows Admin Tool Kit Click here and download it now
April 18th, 2012 2:51pm

Beside two different Plantronics headset I have also used two different headsets from Jabra no joy!Steve Behman
April 18th, 2012 2:56pm

Hello folks, I am totally befuddled! I have found two versions of Devcon.exe both of which are dated 2/8/2010. I have named one of them Devcon-old and the other Devcon-new (i.e. newer by 25 min. and larger by 4 kB!) Devcon-old was obtained from: "\SDK\WinDDK\7600.16385.win7_wdk.100208-1538\tools\devcon \i386\devcon.exe" the other was found elsewhere on the Web (I really don't remember where.) As can be observed from the outputs below they behave radically differently from one another. Devcon-old is completely useless and will not be discussed further all subsequent discussion of "Devcon" refers to Devcon-new.exe. If either the enable or restart subcommands are omitted after reboot the device completely disappears from the system. That is it does not appear in "Device Manager" nor will "Scan for Hardware Changes" find the device. Only running the restart subcommand and rebooting restores the device to device manager and the sounds dialog. The above gives rise to the question: Is there a newer version of Devcon (or something else) that really will disable a device without a reboot? If the answer to the above is "no" I am afraid I am on a fools errand! I would appreciate any guidance or comments. Thanks, ====== Speaker Command Output Using "New" ========== d:\>Devcon-new find "@USB\VID_047F*" USB\VID_047F&PID_0410&MI_03\6&14AB3D07&0&0003 : USB Input Device USB\VID_047F&PID_0410\5&35EDA8E7&0&1 : USB Composite Device USB\VID_047F&PID_0410&MI_00\6&14AB3D07&0&0000 : CS50/CS60-USB Headset 3 matching device(s) found. d:\>Devcon-new disable "@USB\VID_047F*" USB\VID_047F&PID_0410&MI_03\6&14AB3D07&0&0003 : Disabled USB\VID_047F&PID_0410\5&35EDA8E7&0&1 : Disabled on reboot USB\VID_047F&PID_0410&MI_00\6&14AB3D07&0&0000 : Disabled on reboot The 3 device(s) are ready to be disabled. To disable the devices, restart thedevices or reboot the system . d:\>Devcon-new restart "@USB\VID_047F*" USB\VID_047F&PID_0410&MI_03\6&14AB3D07&0&0003 : Restarted USB\VID_047F&PID_0410\5&35EDA8E7&0&1 : Requires reboot USB\VID_047F&PID_0410&MI_00\6&14AB3D07&0&0000 : Requires reboot The 3 device(s) are ready to be restarted. To restart the devices, reboot the system. d:\>Devcon-new enable "@USB\VID_047F*" USB\VID_047F&PID_0410&MI_03\6&14AB3D07&0&0003 : Enabled USB\VID_047F&PID_0410\5&35EDA8E7&0&1 : Enabled USB\VID_047F&PID_0410&MI_00\6&14AB3D07&0&0000 : Enabled 3 device(s) are enabled. ======== Speaker Command Output Using ("Old") ======================= d:\>Devcon-old find "@USB\VID_047F*" USB\VID_047F&PID_0410&MI_03\6&14AB3D07&0&0003 : USB Input Device USB\VID_047F&PID_0410\5&35EDA8E7&0&1 : USB Composite Device USB\VID_047F&PID_0410&MI_00\6&14AB3D07&0&0000 : CS50/CS60-USB Headset 3 matching device(s) found. d:\>Devcon-old disable "@USB\VID_047F*" USB\VID_047F&PID_0410&MI_03\6&14AB3D07&0&0003 : Disable failed USB\VID_047F&PID_0410\5&35EDA8E7&0&1 : Disable failed USB\VID_047F&PID_0410&MI_00\6&14AB3D07&0&0000 : Disable failed No matching devices found. d:\>Devcon-old restart "@USB\VID_047F*" USB\VID_047F&PID_0410&MI_03\6&14AB3D07&0&0003 : Restart failed USB\VID_047F&PID_0410\5&35EDA8E7&0&1 : Restart failed USB\VID_047F&PID_0410&MI_00\6&14AB3D07&0&0000 : Restart failed No matching devices found. d:\>Devcon-old enable "@USB\VID_047F*" USB\VID_047F&PID_0410&MI_03\6&14AB3D07&0&0003 : Enable failed USB\VID_047F&PID_0410\5&35EDA8E7&0&1 : Enable failed USB\VID_047F&PID_0410&MI_00\6&14AB3D07&0&0000 : Enable failed No matching devices found. ============================================Steve Behman
Free Windows Admin Tool Kit Click here and download it now
April 19th, 2012 10:57am

You might have unplug the usb headphones to disable the device without rebooting. And unplugging the headphones might fix your problem anyway.
April 19th, 2012 11:14am

I have located four distinct versions of Devcon.exe. The oldest of them was dated 2003 and the newest (for Windows 7) is dated February 17, 2012. Unfortunately, none of them will mimic the actions that can be taken with either the "Sounds" or "Device Manager" dialogs with which you can immediately disable a device (e.g. my USB headset.) Before any of the versions of Devcon will disable a device there must be in the intervening system reboot this, of course, totally defeats my intended purpose. I have been unable to find anything documenting the use of Devcon except for the Devcon "help" subcommand. The "help disable" subcommand description offers the "-r" switch the use of which causes Devcon to force a reboot. Absent is a (hoped for) "-i" switch which would tell Devcon to disable the referenced device and do it right now! As a consequence of the behavior of Devcon.exe I am no closer to a solution to my problem. Clearly, Devcon is not it! I would appreciate any further suggestions because the problem I am trying to solve is an extremely frustrating one costing me a great deal of time and effort every day. Thanks, Steve Behman
Free Windows Admin Tool Kit Click here and download it now
April 20th, 2012 2:10pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics