Using devcon to install a device driver

Hi,

I’m using devcon to manually install a device driver in the software installer with the following command:

devcon.exe install filename.inf USB\VID_XXXX&PID_YYYY

It installs the device driver but when I go to device manager, there are two entries of the device driver and one of them has an exclamation mark behind it.

Does anyone has a clue about why this happens?

Thanks,

Nuno

Devcon install creates a root enumerated device. You want devcon update.

d

debt from my phone

-----Original Message-----
From: xxxxx@imaginando.net
Sent: Tuesday, July 05, 2011 7:15 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Using devcon to install a device driver

Hi,

I’m using devcon to manually install a device driver in the software installer with the following command:

devcon.exe install filename.inf USB\VID_XXXX&PID_YYYY

It installs the device driver but when I go to device manager, there are two entries of the device driver and one of them has an exclamation mark behind it.

Does anyone has a clue about why this happens?

Thanks,

Nuno


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Hi,

Thanks for the quick reply!

But and if there isn’t a root node node? I tried with update and once it worked and once not. How can I overcome this?

Thanks,

Nuno

Update works if the device is plugged in. Otherwise you should use the driver package APIs and install your driver package so that thebinstall first/plug in second scenario works.

d

debt from my phone

-----Original Message-----
From: xxxxx@imaginando.net
Sent: Tuesday, July 05, 2011 8:28 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Using devcon to install a device driver

Hi,

Thanks for the quick reply!

But and if there isn’t a root node node? I tried with update and once it worked and once not. How can I overcome this?

Thanks,

Nuno


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Hi Doron,

But the device was plugged in during my devcon update tests… and it failed…

I’m using Inno Setup Compiler, the driver package APIs belong to WinDDK?

Thanks,

Nuno

> I tried with update and once it worked and once not. How can I overcome this?

If the root-enumerated device still is in device manager, uninstall it.
Connect your USB device. If the “new device found” pops up, cancel out of it.
The device should be visible in device manager (either with yellow bang or not),
so you’ll know that the USB bus driver sees it.
Then run devcon update USB\your-hw-id

If you want to preinstall the drver before the device is plugged in, use devcon dp_add.

–pa

ok. thanks for the tips.

devcon remove only removes the device from the tree without actually removing the device driver files.

how can I force the uninstall and delete driver with devcon? is it possible?

the options listed doesn’t make feel confortable about that.

Thanks,

Nuno

> devcon remove only removes the device from the tree without actually removing
the device driver files.

how can I force the uninstall and delete driver with devcon? is it possible?

devcon dp_delete does this. To undo all effects of installing a driver - especially after it has failed because of errors in the INF or code - restore your last clean image backup (hint!)

the options listed doesn’t make feel confortable about that.

Feel comfortable? huh? what’s this?

–pa

xxxxx@imaginando.net wrote:

devcon remove only removes the device from the tree without actually removing the device driver files.

how can I force the uninstall and delete driver with devcon? is it possible?

Don’t worry about that. Just install your new files over the top of the
old. You do have “devcon dp_delete” to remove a device package from the
driver store.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

devcon dp_add installs a driver package.

devcon install creates a root devnode, this is not what you want.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

wrote in message news:xxxxx@ntdev…
> Hi,
>
> I’m using devcon to manually install a device driver in the software installer with the following command:
>
> devcon.exe install filename.inf USB\VID_XXXX&PID_YYYY
>
> It installs the device driver but when I go to device manager, there are two entries of the device driver and one of them has an exclamation mark behind it.
>
> Does anyone has a clue about why this happens?
>
> Thanks,
>
> Nuno
>