From: Uwe Sieber on
Maxim S. Shatskih wrote:
>> There are some *free* partition table editing tools that let you
>> change the existing (FAT16?) partition type, for example, to
>
> Very many flash drives are simulating removable media and thus have no partition table.

They don't need a partition table but many
come with one from factory.

>
> Just overwrite sector 0 with zeroes.

Even filled with 0 Windows would see this
as RAW volume and would assign a drive letter.


Uwe

From: eric selk on
On Oct 4, 12:19 am, Uwe Sieber <m...(a)uwe-sieber.de> wrote:
> If the partition table contains a single hidden partition then
> there will be no drive letter and no autoplay.

This does not seem to be the case with my testing. Read on...

> If your drive has no partition table then format
> it by means of the "HP USB Format Tool".

I did this, using that tool.

> For hiding a partition you need a 3rd party
> tool or a disk editor...

I used PTEDIT32.EXE which comes with Partition Magic 5.0. It
correctly displayed whatever type I had formatted it as using the HP
Tool (tried FAT, FAT32, and NTFS). Then it lets me "Set Type" and I
tried changing it to "Hidden FAT32" and "Hidden IFS (NTFS)", and saved
the changes. Even after clearing registry settings for the USB device
and a reboot, Windows would still assign a drive letter to the "hidden
partition". I think I read somewhere that Windows ignores that info
for removable media and always uses the first partition, and ignores
any special attributes (such as hidden).

On the plus side -- if I set the partition type to "00 - Freespace",
that at least stops Windows from doing any autoplay/autorun behaviors,
which was the main thing I wanted anyway. This will probably be good
enough for now, and once we get in to larger quantities we can do
something better. Windows still assigns a drive letter, but not a big
deal -- if the user trys to access it, Windows just says it isn't
formatted, and asks if they want to format (however, the normal
Windows utility will always fail).

I've only tested on XP so far, but the above is what I was seeing with
my testing. As long as Vista and 7 do something similar, this should
be fine.

> Even with a hidden partition XP and Vista
> will take more than 10 seconds for the plug
> and wait procedure. W2K and Win7 do much faster.

Cool, glad the future might be better, if everyone likes 7 more than
Vista at least, and they actually upgrade this time.
From: Uwe Sieber on

Confirmed. Windows assings a drive letter even to
hidden partitions on REMOVABLE drives. Did not
expect that...

When your software has identified the drive then
it could remove the drive letter by calling
DeleteVolumeMountpoint.


Uwe



eric selk wrote:
> On Oct 4, 12:19 am, Uwe Sieber <m...(a)uwe-sieber.de> wrote:
>> If the partition table contains a single hidden partition then
>> there will be no drive letter and no autoplay.
>
> This does not seem to be the case with my testing. Read on...
>
>> If your drive has no partition table then format
>> it by means of the "HP USB Format Tool".
>
> I did this, using that tool.
>
>> For hiding a partition you need a 3rd party
>> tool or a disk editor...
>
> I used PTEDIT32.EXE which comes with Partition Magic 5.0. It
> correctly displayed whatever type I had formatted it as using the HP
> Tool (tried FAT, FAT32, and NTFS). Then it lets me "Set Type" and I
> tried changing it to "Hidden FAT32" and "Hidden IFS (NTFS)", and saved
> the changes. Even after clearing registry settings for the USB device
> and a reboot, Windows would still assign a drive letter to the "hidden
> partition". I think I read somewhere that Windows ignores that info
> for removable media and always uses the first partition, and ignores
> any special attributes (such as hidden).
>
> On the plus side -- if I set the partition type to "00 - Freespace",
> that at least stops Windows from doing any autoplay/autorun behaviors,
> which was the main thing I wanted anyway. This will probably be good
> enough for now, and once we get in to larger quantities we can do
> something better. Windows still assigns a drive letter, but not a big
> deal -- if the user trys to access it, Windows just says it isn't
> formatted, and asks if they want to format (however, the normal
> Windows utility will always fail).
>
> I've only tested on XP so far, but the above is what I was seeing with
> my testing. As long as Vista and 7 do something similar, this should
> be fine.
>
>> Even with a hidden partition XP and Vista
>> will take more than 10 seconds for the plug
>> and wait procedure. W2K and Win7 do much faster.
>
> Cool, glad the future might be better, if everyone likes 7 more than
> Vista at least, and they actually upgrade this time.
From: eric selk on
On Oct 6, 12:14 am, Uwe Sieber <m...(a)uwe-sieber.de> wrote:
> Confirmed. Windows assings a drive letter even to
> hidden partitions on REMOVABLE drives. Did not
> expect that...
>
> When your software has identified the drive then
> it could remove the drive letter by calling
> DeleteVolumeMountpoint.
>
> Uwe

Yes, exactly what I was thinking. This should work well... no initial
autoplay/autorun, and then I'll delete the mount point so the user has
no drive letter (and that also kills any future autoplay, but it is
really that first autoplay I was worried about anyway).
From: Ray Trent on
Well, you can get a Cypress USB low-speed HID micro for ~$2 from
distributors (probably quite a bit less if you order in quantity
directly). A development kit is something like $100... which you'd have
to amortize over your quantity (however much that is).

And an onshore PCB stuffing house could probably build and stuff a tiny
board with a USB connector for ~$1. But then you'd still be stuck
without a housing. That might not matter to you, don't know... potting a
board like this in epoxy isn't too hard, even by hand... but might not
meet your appearance criteria.

Basically, though, if you're currently getting something for ~$5, you're
not going to find anything all *that* much better in low quantities
on-shore. And it will be considerable work, which you'd also have to
amortize.

eric selk wrote:
>> Would you prefer free? (in terms of cost, not time) There is always
>> using DSF provided in the WDK. There are some great examples there,
>> but of course, there will be some significant work on your part.
>> Beauty is, you can make anything you want and make it do anything you
>> want.
>>
>> Hope this helps,
>> Kosta
>
> Could be an option, but that only covers the software side, and I need
> something users can plug in to an actual USB port. Also, since the
> device doesn't actually need to do anything (just have a serial
> number), guess I don't really need any software on it... excuse me if
> my terms are incorrect, it is probably "firmware" when you are talking
> about software on hardware.


--
Ray