USB memory stick plug/unplug info

K.I.L.E.R

Retarded moron
Veteran
I've never seen a point to why you should click on the little icon in the taskbar to shutdown the memory stick then unplug it.

I realise if you don't do it and you are writing data to the mem stick you can lose data.

However if you are not writing or reading from it can I safely assume it's okay to just unplug the damn thing?
 
What happens is that the writes are cached in memory. If you remove the stick before the cache has been flushed then they will not get to the stick. I beleive somewhere their is a setting probably just right click on the drive, so that you can tell it that you don't want cached writes, select that and you can remove the stick as soon as you are not trying to write to it.

CC
 
IIRC the write cache is disabled by default (only for removable drives).
 
I sometimes get to pondering some of the uses of the USB memory sticks. I think it would be great if you could install your favorite applications to a memory stick. Which you could then just carry around and plug in to any computer you are wanting to use (ok limit to PC's). To make this useful it should automatically install any registry entries/dlls that the app needs, and remove them when you unplug.

Thinking about the individual bits of this there isn't really much stopping you doing this with a few limitations.
First you would need to install it to the memory stick using some kind of monitoring code like regmon and filemon (available from sysinternals.com). The big trick would be making sure that the application knows where it lives. To me the best way of doing that would be to use the NTFS junction command which would basically map the usb drive to a specified folder on the machine (you have to download the exe to be able to use it, but it is part of the NTFS file system). The main problem with this is that junction requires NTFS and I am not sure that usb memory devices support the junction command.

So your steps would basically be.
Install app via monitoring software. This will produce an autoinstall script which contains registry keys and files copied outside of the apps home directory.
The memory stick will have an autorun.exe which when executed runs the junction command to map the drive, install the registry keys and copy the files. Launch a service to monitor the usb drive state so that it can can auto uninstall the regkeys etc when you unplug the stick.


My other though was that this could be a good way for companies to manage licenses for software. Instead of a usb dongle which acts as a license, the app could be distributed on the usb stick with a built in license management. This obviously won't be much good for speed critical apps, but things like Office etc should be fine loading from a USB2.0 drive.

Anyone any better ideas?
 
Back
Top