4

I have a USB broadband card on my Windows 7 laptop. It loathes resuming from hibernation properly. Back in the XP days I would issue a call devcon.exe from the command prompt and restart the selected ports (Saves you having to manually unplug and plug back in your USB devices).

Ive been trying this is Windows 7, but the UAC keeps getting in the way. I'll start a command prompt. Issue the devcon command, but UAC asks me if I really want to do this, when I click yes it opens a different command prompt and launches the command. After the command completed this new prompt window closes faster than the speed of light and I cannot see the results. So Im thinking there has to be a better way to do this in the Vista/Win7 world...?


Edit: Ive found with the Microsoft Application Compatibility Pack and this tutorial (www.vista4beginners.com/Disable-UAC-for-certain-applications) I was able to disable UAC for specific applications. This solved my devcon closing problem, but after solving that issue I realized that devcon is broken for 64-bit Windows 7 on a x86 architecture.... So there still is no way to restart a usb port it looks like.... Hrmgh!

3
  • have you tried it from an elevated command prompt? i can't recall the procedure for getting one offhand but i'll let someone else post the details, but i think that's what you want. May 6, 2010 at 13:39
  • To be honest, I disabled UAC. I can't see any value in it. May 6, 2010 at 14:38
  • Does NirSoft USBDeview solve your problem? At least that utility is available for x64... See nirsoft.net/utils/usb_devices_view.html
    – onnodb
    Apr 9, 2011 at 7:00

1 Answer 1

1

Run CMD elevated:

Start Menu-All Programs-Accessories rightclick on "Command Prompt" and select "Run as administrator"

Although i have to admit i didnt get Devcon to work either on Win7.It correctly found all hardware and their strings but every time i tried to disable/enable any device the command would fail even with elevated command prompt. So atleast for restarting my network connection i use this now:

netsh interface set interface "Local Area Connection" disabled
choice /T 5 /D y > nul
netsh interface set interface "Local Area Connection" enabled

Where "Local Area Connection" is the name of the connection to be restarted and "choice" is for waiting(depends on adapter...some disable fast but others don't so its better to wait a little).I have no idea how to restart usb ports without Devcon tho.

4
  • Does choice exist in Win7? As I recall, it didn't come with any previous WinNT version. May 6, 2010 at 19:38
  • Are you running 64-bit windows in a x86 processor? Ive been reading that devcon is broken for this architecture (works for ia64 though) May 7, 2010 at 1:47
  • comment by TMRW: @grawity - Yes choice is included by default. May 7, 2010 at 22:18
  • comment by TMRW: @ProfessionalAmateur - Indeed i am running 64bit Windows 7.As far as the CPU goes that should not be a problem since my old AMD Athlon X2 3800+ SOC939 is 64bit capable. Although if Devcon simply isnt compatible with x64 then it would explain quite few things. Still i wander tho - it's possible to disable a device from Device Manager so there must be some undelying funtion for this even on x64. May 7, 2010 at 22:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .