For Windows 10, Other devices, and those who are still unsure
If you are still unsure, the registry edit should do the trick even with Windows 10. However, if it is not working, you may have to modify it. It might be because of a different version of the device, or a different handset.
In my case it is because I'm trying to do this on a HTC Legend (don't ask, it's a project) and on Windows 10.
To do this, find your device in device manager. (type devmgmt.msc into "run" or search device manager in start). Right click and select properties. Go to the details tab at the top. Select "Hardware IDs" from the property list. You will see a series of numbers. E.g. VID_0BB4, that matches the "0BB4" in the registry file provided (edit with notepad). Once you have found your device ID, you can add the binary value manually to that usbflag key.
In my case I had to alter the registry file simply to 0BB40FFF0100, which already existed in regedit. Simply add the binary value or edit the registry file and double click it to merge with the registry.
Hope this is useful.