Help -Remove unconfigured Device from DeviceManager

Discussion in 'Windows Vista Drivers' started by Jithin PG, Sep 15, 2008.

  1. Jithin PG

    Jithin PG Guest

    When we plug a new device into USB, windows will show the found new hardware
    wizard. When we cancel it, it shows a baloon notification that the device is
    not configured properly. But the device will be shown in yellow ? mark in
    device manager. i need to search for an unconfigured device shown in yellow ?
    mark in Device Manager and delete it programatically using VC++ (the same
    thing we do by rightclick and uninstall in device manager). I googled and
    found that SetupDiXXX API's are there to do device management functions. But
    i'm not sure which API's to use, MSDN having only limited documentation. I
    have Device's Name( the name which is listed in devicemanager) so i need to
    find using that name. please do help me doing this..., its an urgent
    matter... Thanks in advance
     
    Jithin PG, Sep 15, 2008
    #1
    1. Advertisements

  2. Jithin PG

    Pavel A. Guest

    Yes, use SetupDiXXX API.
    You can find devices with yellow ? and other install problems by
    quering SetupDiGetDeviceRegistryProperty SPDRP_INSTALL_STATE.


    --PA
     
    Pavel A., Sep 15, 2008
    #2
    1. Advertisements

  3. you do realize that uninstalling the device will not matter b/c as soon as
    the usb bus rescans (due to any change or the user asking for it), it will
    show up again and you will see the same process with the pop up and the ?'ed
    device. i think what you want is to disable the device, which will persist
    across reboots and rescans and the user will not be notified again until it
    is enabled

    d
     
    Doron Holan [MSFT], Sep 15, 2008
    #3
  4. Jithin PG

    Jithin PG Guest

    Can you please provide me a sample code? i'm new to this area. thanx in
    advance..:)
     
    Jithin PG, Sep 16, 2008
    #4
  5. Jithin PG

    Tim Roberts Guest

    The best source of sample code for the SetupDi functions is the "devcon"
    tool in the DDK/WDK. I don't know whether this exact case is covered, but
    you'll see the general philosophy.
     
    Tim Roberts, Sep 17, 2008
    #5
  6. can you provide me a sample? i'm tired of searching for a sample on
    this topic. i found SetupDi API's which helps me uninstalling an
    installed driver but not removing unknown and not-installed device in
    yellow question mark. thanks in advance
     
    The Warrior Within, Sep 18, 2008
    #6
  7. Jithin PG

    Pavel A. Guest

    Sorry I can't. Also, Doron is right, maybe what you actually need is
    disable the device.

    (A side note: having unusual requirements often indicates going to a
    wrong direction ... )

    --PA
     
    Pavel A., Sep 18, 2008
    #7
    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.