Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dealing with paths...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00485806
Message ID:
00485832
Vues:
12
>Hi friends! Is there a preferred way to deal with paths?
>
>Because you cannot determine beforehand where a user will install your app... is there a command that susses out the path so that it can be included with a set path to command in the start up program for example?
>
>I have up to now used a sort of flaky approach with loads of set paths all over the show... Not good really...
>
>Also are there any good examples of start up programs that show the kind of stuff that should be included?

Chris,
IMO, you should dictate the structure under the initial installation directory. By this, I mean the user can select any drive/directory they want to install your application. However, you create all subdirectories under that directory and you don't have to worry about pathing. You can easily set up the path in your main program to look in the subdirectories.
Ex.
Q:\Dir1\Dir2\MyInstallDir
--- Data
--- Reports
:
etc.
The path statement in your application would be
set path to .;Data;Reports

Having said that, if you want more flexibility then you should default to your subdirectories. Provide an interface for the user to select directories for other items (e.g. Data). When they select a new one, write that information to the registry or an INI file. Read that information just before you set the pathing information and set it appropriately.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform