Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

USB mass storage: block mounting of file system - filter driver?

46 views
Skip to first unread message

hannes_rohde

unread,
Nov 20, 2009, 3:34:39 AM11/20/09
to
Hi,

I am currently developing an application for mass duplication of usb
thumbdrives with a hardware extension to switch usb sticks after they
have been written.

There are however some issues with windows (xp) being very slow (more
than 30 seconds) in the detection of new device arrivals on some hub
ports after several sticks have been copied, ejected and removed.

One reason for this behaviour could be the complexity of the
enumeration process which involves mounting of the stick and
assignment of a drive letter, as the thumb drives we use come pre-
formatted with a fat filesystem.

I do not need the mounted drive letter for my application, I access
the disk via WriteFile to "\\.\PhysicalDriveX".

My idea now is to somehow interrupt the enumeration process by either
simulating an unknown filesystem or hooking into the driver stack
between disk- and partition-drivers.

Can anyone here confirm that this is a reasonable approach or am I
missing something obvious?
I don't have much experience with windows low level programming so I'm
grateful for any advise you can give me...

Regards and thanks in advance,
Hannes

Uwe Sieber

unread,
Nov 22, 2009, 2:47:42 PM11/22/09
to

Mounting the file system is the very last step only and
I think blocking this would not result in a noticeable
acceleration.
If your USB drives are all completely different then
go back to Windows 2000 or upgrade to Windows 7. Both
detect new USB drives much faster than XP.

If they all the same then they obviously have all a
unique USB hardware serial number (which is good).
But this is what makes each new drive beeing detected
as new one. You can make Windows ignoring the serial.
The drives with the same vendor+device ID will be
seen then as the same drive when attached to the same USB
port. Once you had a drive on each port, the detection
as new device will not occur anymore.
Read more on my page:
http://www.uwe-sieber.de/usbtrouble_e.html#serial


Uwe

hannes_rohde

unread,
Nov 23, 2009, 3:40:29 AM11/23/09
to
Hi Uwe,

thanks for your reply! I already found out about the
IgnoreHWSerNumVID_PID_ registry key, this did help speed up the
installation process and also got rid of the bubble hints from the
systray.
However, my finding was that the value to set in the registry is 00,
not 01 as recommended everywhere. Anyone able to confirm this?

I also found a registry setting HKLM\SYSTEM\CurrentControlSet\Services
\mountmgr\noautomount which when set to 0x00000001 should disable all
drive mounting. However this seems a bit drastic to me. A setting like
this for certain device classes would be perfect, but I was not able
to find anything.

The target os for the application is windows 7, I am glad to hear usb
sticks are detected faster there. I just hope I don't run into any new
problems when migrating.

Regards,
Hannes

Uwe Sieber

unread,
Nov 23, 2009, 3:43:24 PM11/23/09
to

For IgnoreHWSerNumVID_PID_ it is indeed 1 to ignore
the serial.
noautomount works on NT 5.2 and higher only, so it
does not have any effect under XP. As far as I know
it affects all basic volumes, there is no more detailed
configuration. If the computer's main purpose is mass
duplication then I would say, use it and document the
effect.

Regards,

Uwe

0 new messages