Remove driver from Registry

Discussion in 'Windows Vista Drivers' started by kvartan, Oct 31, 2007.

  1. kvartan

    kvartan Guest

    Hi all,
    I am working on an inf file that uses a Virtual COM Port to
    communicate with my machine. Currently, I am trying to remove the
    driver, but uninstalling is not working. Every time I uninstall and
    connect the device, it automatically locates the driver and installs

    I know/think that there is something to do with the registry files,
    but I am not sure where to start looking. I know the VID and PID of
    the product, but I don't know where it is installed?
    Can anyone tell me how to look, and where to look for those files? In
    addition, is there somewhere else that I should be looking into?

    My goal is, when I connect the device, I want it to look like it is
    the very first time I have attached it to the machine.

    Thanks in advance.
    kvartan, Oct 31, 2007
    1. Advertisements

  2. Never hack around in the registry to remove devices. Especially in a
    situation like modem or COM ports where the class installer goes off
    and does other stuff (in this case, allocating COM ports -- you are
    likely orphaning COM ports when you do this and will need to hand edit
    your COMDb later...)

    Just choose "uninstall" in Device Manager, this will remove the
    device. To remove the driver so it doesn't automatically install, go
    into C:\Windows\Inf and look for the OEMxx.INF that references your
    hardware ID, and remove it (along with the associated .PNF.
    chris.aseltine, Oct 31, 2007
    1. Advertisements

  3. kvartan

    Farhan Ahmed Guest

    In Vista, you should use the inbox utility - 'pnputil.exe' to remove
    drivers from the system. Deleting INF files manually will leave the
    cache and the driver database out of sync.

    pnputil.exe -e will list the 3rd party drivers currently on the
    system. Once you figure out the 'oem' name of the INF file you wish to
    remove, calling pnputil.exe -d <oem inf name> will remove the driver
    package from the system.

    And as Chris mentioned, uninstalling the device from device manager
    and removing the driver package from the system (as above) will get
    you in the state you want.


    Farhan Ahmed, Nov 1, 2007
  4. kvartan

    kvartan Guest

    What is this OEM?? I can't find anything with that name.
    kvartan, Nov 1, 2007
  5. kvartan

    Don Burn Guest

    OEMx.inf and OEMx.pnf are files in the system INF directory, unless your
    driver is signed, the INF file you provide will be copied to OEMx.inf and
    then made a pnf. Note Chris is incorrect this will not completely remove
    the driver from the system.

    Don Burn (MVP, Windows DDK)
    Windows 2k/XP/2k3 Filesystem and Driver Consulting
    Remove StopSpam to reply
    Don Burn, Nov 2, 2007
  6. kvartan

    Tim Roberts Guest

    Really? Have you never installed a non-standard piece of hardware? The
    INF file for the first 3rd-party device you installed gets copied to
    \Windows\Inf\oem0.inf, the second one gets copied to oem1.inf, and so on.

    I have up to oem20.inf, and I haven't even had this machine very long.
    Tim Roberts, Nov 2, 2007
  7. kvartan

    kvartan Guest

    Mr. Tim Roberts,
    There is a first time for everything. I was not familiar with OEM
    files, until now. But I do appreciate your explanation on how it is
    organized. I, as a matter of fact, have been modifying the INF file
    for this device. However, it is my first INF file that I've seen, and
    I am still learning.
    kvartan, Nov 2, 2007
  8. I never said it would completely remove the driver from the machine.
    Where did I say that?

    The OP said he wanted the machine to behave as if the device were
    connected for the first time with no drivers automatically found.
    Blowing away the OEMxx files will accomplish that, including on Vista,
    despite what that other guy was saying.

    The "driver store" idea in Vista is an abomination, during the Beta's
    you could get your system into a state where it was completely
    impossible to remove drivers.

    Eventually around RC1 or so, they reverted to treating INFs in Windows
    \Inf the same way as XP, while still storing drivers in the driver

    I assume this whole idea was to prevent "please insert CD-ROM"-style
    dialog boxes on a new hardware installation where the previous device
    installation picked up drivers from a location that is now gone, but
    it had unintended side effects.
    chris.aseltine, Nov 2, 2007
  9. What operating system?

    If it's XP then you can look in %WINDIR%\inf at the "oem*.inf" files. Find
    the one that corresponds to your driver and delete it and the matching .pnf

    If it's Vista then once you find your INF file above you can use 'devcon
    dp_delete oem*.inf' replacing * with the number of the file you found. This
    will delete the driver package from the system (including the copy in the
    driver store).

    Peter Wieland [MSFT], Nov 2, 2007
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.