Can devcon.exe be distributed on an installation CD?

I have a software-only UMDF driver that needs installation as part of the Windows installer. The only way I know to programatically install a device for my software only driver appears to be devcon.exe (review software-only example in WDK as well).

If devcon.exe is the only way to install a software-only driver, can this utility be part of the installation CD?

Unfortunately, I’m pretty sure that one may not redistribute devcon.exe.

I’ve never worked with UMDF, so I don’t know the answer, but have you looked at the nonpnp KMDF sample, in particular the html documentaion file and the INF? I don’t know if it will help you, but it might be worth a look. Then again, I’m sure that Doron will be along shortly with the definitive answer.

Good luck,

mm

IIRC, the answer to distribution is no, but the sources to DevCon are
avaialble so take the pieces of the code to install your driver from DevCon
and make your own program.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply

wrote in message news:xxxxx@ntdev…
>I have a software-only UMDF driver that needs installation as part of the
>Windows installer. The only way I know to programatically install a device
>for my software only driver appears to be devcon.exe (review software-only
>example in WDK as well).
>
> If devcon.exe is the only way to install a software-only driver, can this
> utility be part of the installation CD?
>

Don is correct, you cannot ship devcon as is, but it is rather easy to pull out what you need from the sources and add it to your own installer or create your own devcon like exe. The nonpnp KMDF sample is not appropriate here though. Since it is not a pnp stack, you can manually install the service and then start it while a pnp stack (which all UMDF drivers are) needs a pnp device node which is what devcon creates for you.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Wednesday, October 10, 2007 2:33 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Can devcon.exe be distributed on an installation CD?

IIRC, the answer to distribution is no, but the sources to DevCon are
avaialble so take the pieces of the code to install your driver from DevCon
and make your own program.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply

wrote in message news:xxxxx@ntdev…
>I have a software-only UMDF driver that needs installation as part of the
>Windows installer. The only way I know to programatically install a device
>for my software only driver appears to be devcon.exe (review software-only
>example in WDK as well).
>
> If devcon.exe is the only way to install a software-only driver, can this
> utility be part of the installation CD?
>


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

Thanks!
To wrap this issue up I have a few assumptions/questions:

  1. Where is the devcon code found?
  2. The solution proposed above must be a common one since a software only PnP driver is possible for a product.
  3. There are no legal issues taking the devcon source and rolling your own installation utility in a comercial product.
  4. Optional: Why didn’t MS provide an easy installation solution for this type of driver?
  1. look in the WDK, it is not that hard to find (dir /s /ad is your friend)
    2) common for those who need a root enumerated device, not everyone needs a root enumerated device though
    3) like any WDK sample, you can create your product from it
    4) a few reasons.
    a) it is not as common as you probably think it is.
    b) Oversight and even if we added something for the next version of windows, every previous version still has the same issue in that there is no utility.
    c) there is an easy solution, you call the APIs directly. Think of it this way. If there was an in box utility, it would probably have to be very complicated to handle many different usage scenarios that are almost just as easy to do yourself in code

    d

    -----Original Message-----
    From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@aeshen.com
    Sent: Wednesday, October 10, 2007 10:46 PM
    To: Windows System Software Devs Interest List
    Subject: RE:[ntdev] Can devcon.exe be distributed on an installation CD?

    Thanks!
    To wrap this issue up I have a few assumptions/questions:

    1. Where is the devcon code found?
    2. The solution proposed above must be a common one since a software only PnP driver is possible for a product.
    3. There are no legal issues taking the devcon source and rolling your own installation utility in a comercial product.
    4. Optional: Why didn’t MS provide an easy installation solution for this type of driver?


    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

Unfortunately there is a bug in UMDF where on some installations the device will not be available after restart when installed as a non-pnp (legacy) device. The only way to get the device up and running again is to uninstall/reinstall it (disable/enable does not work). I have seen this issue on 4 installations of Vista and it was also reported in this thread (http://www.osronline.com/showthread.cfm?link=118510).

As a solution you should try and install your driver through a bus driver. The WDK documentation provides a fantastic starter point for bus driver development and also the API’s required to initiate an installation. Alternitavely, my company is planning an API to make this easier by supplying a signed bus driver and .NET API to ease the installation/management of devices but unfortunately although it is in beta it is therefore not ready yet. If you would like to apply for a beta preview, please email xxxxx@ikanosconsulting.com.

Regards,
James Woodall
http://www.ikanosconsulting.com

Apologies, the email address did not appear correctly.

It is “beta at ikanosconsulting.com”.

Regards,
James Woodall
http://www.ikanosconsulting.com

Comments inline:

wrote in message news:xxxxx@ntdev…
> Thanks!
> To wrap this issue up I have a few assumptions/questions:
>
> 1. Where is the devcon code found?

It is in the WDK under src\setup

> 2. The solution proposed above must be a common one since a software only
> PnP driver is possible for a product.

My experience says that software only PnP are not that common, mainly for
hardware emulation.

> 3. There are no legal issues taking the devcon source and rolling your
> own installation utility in a comercial product.

This is like any other source in WDK you can use it for reference and
development.

> 4. Optional: Why didn’t MS provide an easy installation solution for
> this type of driver?

Again, my experience say not that common.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply


Unfortunately there is a bug in UMDF where on some installations the device will
not be available after restart when installed as a non-pnp (legacy) device. The
only way to get the device up and running again is to uninstall/reinstall it
(disable/enable does not work). I have seen this issue on 4 installations of
Vista and it was also reported in this thread
(http://www.osronline.com/showthread.cfm?link=118510).

I would like to stress that if this is a UMDF bug, I believe this is the first we’ve heard of it. We do try to find and fix our bugs!

If anyone thinks they’re being blown off on a UMDF or KMDF bug, send me an email, and I’ll do my best to follow up. Better yet, use xxxxx@microsoft.com and ping the whole lot of us at one swoop.

Thanks for using WDF technologies. We appreciate your trust.

Thanks Bob. I am not using Vista but XP SP2.

Are my assumptions (1-2) correct in my last post?

>>Thanks Bob. I am not using Vista but XP SP2.

>Are my assumptions (1-2) correct in my last post?

I believe Doron and Don answered those questions as well as (probably better than) I can.

If you’ve got specific questions about deciphering SetupDi calls from devcon and rolling them into your own installer, I believe you’ll find NTDEV an invaluable resource. You might also want to look at a recent blog posting by one of my colleagues (it has several useful links on installation topics):

http://blogs.msdn.com/iliast/archive/2007/10/06/how-driver-installation-works.aspx

Thanks to everyone.

I’m considering reviewing the devcon sample source and writing a custom installer.