USB multiple device, flash and custom

Hi, I am evaluating a possible design.

We are designing a custom USB device. I want to add a (simulated) flash disk
to the device so the unit can self install when plugged into a PC, by
running an autorun.inf.

I hope to expose two interfaces, first a flash disk (mass storage class),
then our device, in the hope that Windows will handle the flash disk without
any installation. so it can run the autorun.inf.

We plan to simulate a standard external flash disk on the first interface,
as we have some spare flash on the device so its microcontroller can handle
accesses targetted at the flash interface and simulate a standard flash
device.

Once the driver for our custom interface has installed, the second and main
part of the device will be ready for the user, and the OS can then find the
driver for it.

Does this approach have any pitfalls? I thought I’d ask early in the
proceedings to avoid the “you’ve started with the wrong approach” sort of
answer that is most common here.

It would be nice to suppress any warnings that the user might get about not
having a driver for the second (custom class) interface before the autorun
has done its work. This is not essential though.

Many thanks for any comments, Mike.

Mike Kemp wrote:

I hope to expose two interfaces, first a flash disk (mass storage class),
then our device, in the hope that Windows will handle the flash disk
without any installation. so it can run the autorun.inf.

You’re assuming the OS will:

  1. Install the drivers for your first interface first,

  2. Always run autorun.inf on your flash drive, and

  3. Autorun will completely preinstall your drivers and exit before device installation begins for the second interface, unless you start playing whack-a-mole with the hardware wizard.

I say: fat chance.

>>I say: fat chance. <<

Hi, as mentioned, it is not essential that it happens in that order. But
autorun should execute (or user can run setup from the exposed disk if
autorun is disabled). This should install the support for the second
interface (probably with some user options anyway). The user may get a “no
driver found” for the second interface at the same time first time, but next
time they plug in it will just work.

Apart from the healthy scepticism on the “silent install” issue, the dual
USB device scheme should work shouldn’t it?

Mike

>>>

----- Original Message -----
From: xxxxx@gmail.com
To: Windows System Software Devs Interest List
Sent: Wednesday, June 11, 2008 1:58 PM
Subject: RE:[ntdev] USB multiple device, flash and custom

Mike Kemp wrote:

I hope to expose two interfaces, first a flash disk (mass storage class),
then our device, in the hope that Windows will handle the flash disk
without any installation. so it can run the autorun.inf.

You’re assuming the OS will:

  1. Install the drivers for your first interface first,

  2. Always run autorun.inf on your flash drive, and

  3. Autorun will completely preinstall your drivers and exit before device
    installation begins for the second interface, unless you start playing
    whack-a-mole with the hardware wizard.

I say: fat chance.


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

You have a couple of problems. Have you ever had a SanDisk Flash Drive?
The U3 software drives create two devices. The first is a CD-ROM device
where an autorun.inf exists. The second is the mass storage drive. They
offer utilities to update the CD portion, eliminate the CD, or recreate the
CD. In some cases, and I don’t know what controls this, when I insert a new
flash drive into a system, the OS will say I need to reboot for the device
to work properly. It usually works without the reboot.

I usually have my system set to never allow autorun.inf to work. I found a
registry key that seems to work better than the other choices. How
‘shrug-and-pray’ will enumerate the multiple devices may vary between the
various OS versions. This is an interesting idea and I would be surprised
if no other company has ever attempted to do it. Maybe they discovered
problems. If the flash drive can enumerate as a CD drive as the U3 drives,
then maybe the software could be automagically installed without having an
autorun.inf but allowing device manager to search it for the correct files.
They could even be updated on the device by the user if they wish to have
the latest driver on the device.

“Mike Kemp” wrote in message news:xxxxx@ntdev…
>>>I say: fat chance. <<
>
> Hi, as mentioned, it is not essential that it happens in that order. But
> autorun should execute (or user can run setup from the exposed disk if
> autorun is disabled). This should install the support for the second
> interface (probably with some user options anyway). The user may get a “no
> driver found” for the second interface at the same time first time, but
> next time they plug in it will just work.
>
> Apart from the healthy scepticism on the “silent install” issue, the dual
> USB device scheme should work shouldn’t it?
>
> Mike
>
>>>>>
>
> ----- Original Message -----
> From: xxxxx@gmail.com
> To: Windows System Software Devs Interest List
> Sent: Wednesday, June 11, 2008 1:58 PM
> Subject: RE:[ntdev] USB multiple device, flash and custom
>
>
> Mike Kemp wrote:
>
>> I hope to expose two interfaces, first a flash disk (mass storage class),
>> then our device, in the hope that Windows will handle the flash disk
>> without any installation. so it can run the autorun.inf.
>
> You’re assuming the OS will:
>
> 1) Install the drivers for your first interface first,
>
> 2) Always run autorun.inf on your flash drive, and
>
> 3) Autorun will completely preinstall your drivers and exit before device
> installation begins for the second interface, unless you start playing
> whack-a-mole with the hardware wizard.
>
> I say: fat chance.
>
> —
> 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 for these comments. I have a USB cellular modem that self installed
like this. And yes, I think you are right, on plugin the icon first appears
as a CD, then after autorun does its stuff, is replaced by the mfr logo. It
opens in “my computer” as a 20MB read only drive with all the install
executables etc. It made me want to try the self install idea, so thought it
worth running past the experts here. Sounds like it is not a well known, but
obviously possible. I will probably give it a try… Mike

>>>>

----- Original Message -----
From: David Craig
Newsgroups: ntdev
To: Windows System Software Devs Interest List
Sent: Wednesday, June 11, 2008 5:04 PM
Subject: Re:[ntdev] USB multiple device, flash and custom

You have a couple of problems. Have you ever had a SanDisk Flash Drive?
The U3 software drives create two devices. The first is a CD-ROM device
where an autorun.inf exists. The second is the mass storage drive. They
offer utilities to update the CD portion, eliminate the CD, or recreate the
CD. In some cases, and I don’t know what controls this, when I insert a new
flash drive into a system, the OS will say I need to reboot for the device
to work properly. It usually works without the reboot.

I usually have my system set to never allow autorun.inf to work. I found a
registry key that seems to work better than the other choices. How
‘shrug-and-pray’ will enumerate the multiple devices may vary between the
various OS versions. This is an interesting idea and I would be surprised
if no other company has ever attempted to do it. Maybe they discovered
problems. If the flash drive can enumerate as a CD drive as the U3 drives,
then maybe the software could be automagically installed without having an
autorun.inf but allowing device manager to search it for the correct files.
They could even be updated on the device by the user if they wish to have
the latest driver on the device.

“Mike Kemp” wrote in message news:xxxxx@ntdev…
>>>I say: fat chance. <<
>
> Hi, as mentioned, it is not essential that it happens in that order. But
> autorun should execute (or user can run setup from the exposed disk if
> autorun is disabled). This should install the support for the second
> interface (probably with some user options anyway). The user may get a “no
> driver found” for the second interface at the same time first time, but
> next time they plug in it will just work.
>
> Apart from the healthy scepticism on the “silent install” issue, the dual
> USB device scheme should work shouldn’t it?
>
> Mike
>
>>>>>
>
> ----- Original Message -----
> From: xxxxx@gmail.com
> To: Windows System Software Devs Interest List
> Sent: Wednesday, June 11, 2008 1:58 PM
> Subject: RE:[ntdev] USB multiple device, flash and custom
>
>
> Mike Kemp wrote:
>
>> I hope to expose two interfaces, first a flash disk (mass storage class),
>> then our device, in the hope that Windows will handle the flash disk
>> without any installation. so it can run the autorun.inf.
>
> You’re assuming the OS will:
>
> 1) Install the drivers for your first interface first,
>
> 2) Always run autorun.inf on your flash drive, and
>
> 3) Autorun will completely preinstall your drivers and exit before device
> installation begins for the second interface, unless you start playing
> whack-a-mole with the hardware wizard.
>
> I say: fat chance.
>
> —
> 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
>


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