7

I recently was given a small USB flash drive as an advertising gimmick. When I plug it in, only one drive appears: a CD drive with 42kb used (just an autorun.inf file which launches the manufacturer's website). I know U3 drives also appear as CD drives, but their uninstall utility only works for their own drives.

How can I make it appear as a USB drive instead? Conversely, if I wanted to do the same thing for myself, how would I make it appear as a CD drive?

I'm sure it can be done programmatically, or else the uninstall program wouldn't work.

5
  • This is probably due to the drivers for the actual drive its self. Jan 10, 2009 at 18:11
  • You're saying it's hopeless unless I write my own drivers?
    – mmyers
    Jan 10, 2009 at 18:14
  • it is related. More to embedded programming of the device, but still programming.
    – Ilya
    Jan 11, 2009 at 11:44
  • Haven't had time to check into any of these answers; I'll check back next week, I hope.
    – mmyers
    Jan 18, 2009 at 5:02
  • ...or not. (The drive is still plugged in, I just still haven't had time to mess with it.a)
    – mmyers
    Apr 10, 2009 at 21:59

4 Answers 4

7

This is done in hardware. The device identifies as a composite device containing two children - one for the CD drive and one for the removable storage drive.

8
  • Unfortunately, there isn't even a removable storage drive shown.
    – mmyers
    Jan 10, 2009 at 18:51
  • By "hardware", do you mean the actual circuitry or the firmware?
    – mmyers
    Jan 10, 2009 at 18:51
  • Firmware and/or drivers. Jan 10, 2009 at 19:34
  • 3
    Drivers usually don't play a part here since the generic OS storage drivers are used (you don't have to install anything to use U3 drives).
    – On Freund
    Jan 10, 2009 at 20:52
  • 1
    The 3G/HDSPA devices I've seen had their CD drive working with no installation. The drivers were needed to enable the actual modem functionality. I've never encountered any device that requires driver installation to enable its 'virtual CD" function, and I work with new devices on a daily basis.
    – On Freund
    Jan 13, 2009 at 12:45
0

Ok, there is 2 questions here :

1) How can I make it appear as a USB drive instead?

It's depends on device itself. I can see 2 options.

  • Device support writing, but represent itself as CDROM and read only. In this case you just need to tweak the device descriptor and you will get working storage device.
  • Device does not implement write and nothing can be done.

By tweaking device descriptor i mean filter driver that will receive device descriptor and will pass a modified one to Windows. Writing filter driver is not very hard and you can find an examples of filter driver in Driver development Kit. A basic understanding of USB protocol will be needed as well.

2) Conversely, if I wanted to do the same thing for myself, how would I make it appear as a CD drive?

Basically same, filter driver that will change the device descriptor to be recognized by CDROM device, but in additional once Windows will recognize CDROM it will send additional SCSI commands to device. Ideally device will just return unsupported command and it's OK, but from my experience most devices are not generic enough and the behavior will be undefined. In this case you will need additional filter driver that will catch this additional commands and will complete the commands without actually sending them to device.

P.S
My answer assume that you don't have access to device firmware, If you do have access to firmware it's really easy to accomplish by modifying device descriptor and making sure that not supported commands are handled correctly.

P.P.S
I don't provide any links to resources since i don't think that practically you going to implement this. If I'm wrong let me know and i will provide relevant resources. Ok one link with general information

7
  • Windows will load different drivers depending on the storage type (Disk.sys and its relevant filters for USB driver, and cdrom.sys and its relevant filters for a CD). I'm not sure that fooling the OS into loading a different driver stack is a good idea.
    – On Freund
    Jan 13, 2009 at 12:51
  • I did not tested it. But based on my long experience with USB and device drivers i can't see any reason why it's might not work. Any way it's the only way to do it without changing the hardware ...
    – Ilya
    Jan 14, 2009 at 8:48
  • It isn't really related to USB layer but to the storage layer. I'm not sure that DISK.sys (not to mention any 3rd party filters it might have on that machine) will gracefully handle devices that should be handled by CDROM.sys
    – On Freund
    Jan 14, 2009 at 11:24
  • There is almost no differences on device side between regular usb flash disk or usb cdrom, filter i suggest is below disk.sys or cdrom.sys layer i,e at usb layer, this filter should eliminate this difference again hard to argue without testing, but can't see how it can affect something ...
    – Ilya
    Jan 15, 2009 at 7:55
  • As I said, disk.sys and cdrom.sys have different filters (some of them could be 3rd party) that might rely on specific behavior. Of course you can have a PnP filter to change device identification (or just create an INF file for that device), but you can't guarantee how these filters will behave.
    – On Freund
    Jan 15, 2009 at 13:18
0

Hey guy, I have done with my usb FD serveral times to make it into 2 devices CD and usb. The only thing you must do is download chipgenius then run it,wait for it to identify your usb then go to http://flashboot.ru/files/ search your usb firmware tool. If you get the correct one i'm sure there will be no problem. I had done that and turned my usb into hiren boot cdrom, and when boot from bios you no longer choose your usb name but choose usb-cdrom option.

1
  • 4
    Interesting, but frankly the .ru domain scares me. Is there any other alternative?
    – mmyers
    Dec 22, 2009 at 15:16
0

The flash drive has been partitioned and formatted using the cdfs file system, use the dos command diskpart to look at and delete\create the partitions as fat fat32 or ntfs

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.