9

Under Windows XP, is there any easy way to change or spoof the vendor- and product-id of a USB device? (changing the corresponding descriptive strings would probably be good too)

Say for example there's a useful program which expects a particular device but you don't see why you should buy a new one when you have a very similar device already that's likely to work with the program.

I've done lots of Googling and apparently it can be done under Linux so it occurs to me to run Windows in a VM under Linux, but that would be a bit inconvenient.

3 Answers 3

7
+75

You might be able to do this with devcon (easiest ways to install listed here), a utility provided with the Windows DDK/WDK. You can find a standalone version suitable for Windows XP at the link.

In particular, devcon's sethwid command may be able to do what you're looking for. See Examples page for some tutorials.

I'm not sure this will do exactly what you want, but I've a strong feeling that it may be as close as you'll get without writing your own filter driver. If you do need to write your own driver, grab the WDK and read the devcon sourcecode in src\setup\devcon.

You may also be able to use devcon in other ways to accomplish your goal, but without further details it's hard to say exactly how. Good luck!

2
  • It's a HID device and not root-enumerated, so sethwid won't touch it :(
    – Hugh Allen
    Apr 9, 2010 at 6:24
  • yeah, that's what my testing looked like too, but i wasn't sure i was getting the syntax right. :/ Apr 9, 2010 at 6:32
8

The USB vendor-id/product-id are likely to be hard-coded in the device's firmware, and might therefore be unchangeable without hacking the firmware.

As most firmware is protected against changes, this is likely to brick the USB device.

Sorry to be negative, but I don't think it's possible.

0
1

I haven't done quite what you're asking, but this might give you a starting point. Also, I've only ever done this kind of stuff on pre-Vista versions.

The information that Device Manager and the Registry use to associate strings with hardware devices is initialized from the .INF file provided with the device. Fortunately, the .INF files are text files structured like .INI files so they're easy to work with. To change the "identity" of an existing device:

  1. Go to the WINDOWS\INF directory and find the right file. Probably you'll need to search through all the .INF files for a unique string associated with the device.
  2. Backup the file.
  3. Open the .INF file with a text editor, find the [Strings] section, and change the appropriate string.
  4. In Device Manager, uninstall and reinstall the device.

Hopefully, your application is only looking for this string. If it's looking for the unique hardware ID (you'll see this in the .INF file as a bus and hardware id number like bus\VID_nnnn&PID_xxxx) then this technique won't work.

5
  • It's a generic device which needed no OEM drivers. (which is good, but) I can't find an INF file for it (and I searched for its product ID in all INF files).
    – Hugh Allen
    Apr 6, 2010 at 12:42
  • @Hugh Allen - can you provide some more info? For instance, what kind of device, which bus is it on, how does the application recognize that it's not the expected device?
    – mtrw
    Apr 6, 2010 at 19:49
  • mouse. USB. Don't know.
    – Hugh Allen
    Apr 6, 2010 at 22:19
  • @Hugh Allen - the only other thing I can recommend is looking for your existing device in Registry\HKLM\SYSTEM\CurrentControlSet, finding the name string, finding the VID/PID, and looking for those VID/PID number in the INF files. However, if the app you're trying to fool uses the VID/PID directly, this technique won't work.
    – mtrw
    Apr 7, 2010 at 6:23
  • @Hugh Allen - I'm sorry, I hadn't clicked through to the link in your question earlier. I didn't understand you were looking to change the VID/PID numbers. The info I gave you would only have changed the strings. The INF files depend on the VID/PID numbers, not define them. Sorry to lead you down the wrong path.
    – mtrw
    Apr 7, 2010 at 6:47

You must log in to answer this question.

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