checking removable drives

Garrett R. Hylltun garretthylltun at gmail.com
Thu Nov 3 17:45:18 EST 2005


On Thu, 03 Nov 2005 14:19:36 -0800
Richard Gaskin <ambassador at fourthworld.com> wrote:

> Garrett R. Hylltun wrote:
>  > Actually, running apps from removable devices is far more common
>  > and growing in popularity.
> 
> How do other portable apps handle the customary behavior of being able 
> to launch an app by double-clicking one of its documents?  Or it is 
> considered acceptable to blow that off for portable apps?

File associations never came into play during my experience with apps on removable devices.

In fact, the whole point was to be less dependent of the os and more dependent on the app itself in order to avoid such headaches, and to be able to run on almost any possible computer.

In the portable app arena, writing to the windows registry is basically taboo.  Saving settings and preferences is kept to the portable device from which the app is being run from.  Of course, this is not a defacto standard or anything, just a rule of thumb that most portable app authors follow.

You can't dummy proof everything to accomodate the less bright users out there.  You have to hit somewhere in the middle to keep a majority happy with your product.

> And if we do ignore that for portable apps, assuming we'd like to ship a 
> single app for both portable and installed use, how can we know we're 
> running installed so that we could write the file association entry to 
> the registry as customers would expect for a hard-drive-installed app?

Under windows you can obtain information about the devices (not sure how to do so under Rev though as I've only been using it for about a week now.) on the system, grab the path of your own program while it's running and compare the drive letter to the list to see if it's running from na hd or removable device.

If Rev doesn't have that ability and you can't find a command line alternative on windows, I can write you up a little app in another language to do this for you.  It would be around 200 to 400 k in size and would not require any external files.  And it would be able to work on Win95 through WinXP.

-Garrett



More information about the use-livecode mailing list