Is it possible to create a USB storage stick so that, besides the storage area, it also has an icon for an application that is permanently embedded in the stick (non-removable)?

The view displayed to the user, when they open the stick in, say, Windows explorer, could look like something shown in below image.

The USB stick in Windows Explorer

I would imagine that it is not possible to have non-removable and user-removable items in the same storage segment, but if that is the case, would it be possible to have them in separate storage segments but still have them displayed in the same directory when the stick is accessed from a PC?

Or, in case that is not possible, is there some other way to accomplish the inclusion of a permanent application together with storage space, on a USB device?

  • 3
    You want a custom-made "U3" standard usb stick. These have a storage area marked as non-writeable by the user and usually presented as an additional USB CD ROM drive.
    – Janka
    Nov 1 '17 at 21:26
  • 1
    I've seen several USB sticks distributed at conventions that appear as multiple devices in the USB tree. When viewed in Disk Management (Windows) or Disk Utility (Mac), they are separate devices. I assume that's done in hardware rather than software. Edit : It may have been U3 like Janka refers to. Nov 1 '17 at 22:10
  • U3 standard was abandoned over a decade ago
    – Ramhound
    Nov 1 '17 at 22:14

Theoretically yes. You can lock the lower level storage and prevent the file table from being edited. Or recreate the file each time.

In practice, it's easier to spilt it up. The U3 or security type drives show up as two partitions or a CD and usb drive partition. One is read only the other is read writable.

  • Doing that plays nicely with host operating system, i.e. doesn't surprise it potentially causing inconsistencies in its cache.
    – Fizz
    Nov 2 '17 at 3:44

If you are comfortable with exploring the hardware/firmware required, there are several USB FAT libraries out there that could be modified to make this work. Basically you would intercept and reject any call to modify that file in the firmware.

  • Thanks @Daniel, being that these are FAT libraries, are they subject to being overwritten if user chooses to format the storage stick?
    – ben.g
    Nov 1 '17 at 21:33
  • 1
    When you write the code that implements the USB Mass Storage functions, you can do anything you like. You could completely ignore the erase command, or recreate the file as the last step, or whatever.
    – Wouter van Ooijen
    Nov 1 '17 at 21:55

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.