I'm sure this is simple but I don't see how to do it (VFP9).
If I create an install for my app that allows the user to place the data files in a directory of his choice, how can the app know where they are? Thanks!
This is a common problem. The answer really depends on the environment, and the degree of control you have over the user's configuration.
One option is to get the user to tell the app where the data is stored the first time the app is used. You could bring up a prompt that asks the user to navigate to a particular file (using GETFILE() perhaps), for example. Once you have found the file, you can store the location in a special table, or in the registry, or any other convenient location.
Another possibility is for the user to edit an INI file that contains the required location. That's not such a good idea if you are relying on an end user to provide the information, but it might be appropriate if a support person (or yourself) is responsible for the install.
Or, you could write a separate little program that prompts the user for the data location, then installs the data there and writes its location to the registry. You would run this program as a post-install task (in other words, call if from your setup program), instead of the setup program itself installing the data.
These are just a few ideas. No doubt, other people will tell you their favourite method.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Just guessing here, but wouldn't there be a registry entry somewhere? Or maybe an uninstall file created?
It seems a feller query one of those locations.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.