What to do when iTunes hoses your USB port

For whatever reason, iTunes sometimes just screws up the the USB device I plug my iPod into. It’s toast, and no device will work; not the iPod, not a flash drive, nothing. No amount of being careful with iTunes and “ejecting” the iPod will help.

Rebooting the computer fixes it, but this happens with such regularity I’d be rebooting several times a day.

But I discovered that if you disable the USB port/device, and then enable it again, the problem is also fixed. Going through the device management dialogs is incredibly cumbersome, so I wrote a script.

fixusb.bat:

@echo off
echo "disabling usb device..."
devcon disable "@USB\VID_0424&PID_2504\5&18F4DAC0&0&5"
echo.
echo "enabling usb device..."
devcon enable "@USB\VID_0424&PID_2504\5&18F4DAC0&0&5"
echo.
pause

The @USB\VID_... bit is the USB device ID. To get the device ID, you’ll have to go to the Device Manager dialog. Figure out which device the iPod is attached to (I don’t remember exactly how I did this; sorry). Then on the “Details” tab of the device “Properties” dialog you can get the “Device Instance Id”.

I have to use this all the time, so put a shortcut to it on the desktop.

Leave a Reply