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


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!

  • 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

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.

  • 3
    Why downvote the correct answer? The accepted answer above did not work out.
    – harrymc
    Apr 14, 2011 at 10:40
  • "It can't be done" is never the correct answer to a software question[1], not to mention completely unhelpful. I was not asking to change the device itself, just an application's view of it. [1] unless it is something un-computable in the Turing sense.
    – Hugh Allen
    Sep 26, 2012 at 14:36
  • 2
    Your question specifically said change or spoof. The Turing way: What you asked can only be done if one has inside knowledge of Windows and/or can patch the operating system. It's also not good netiquette to downvote people trying to help you avoid errors.
    – harrymc
    Sep 26, 2012 at 15:41
  • This isn’t a software question though. ;) // Even if it were possible to change the device ID (which is indeed stored on the device itself), it would still be the same device. “Similar” type is not same type. It will most likely not be able to do what the PC software expects it to do.
    – Daniel B
    Oct 11, 2018 at 11:10

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.

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.