Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you include you config.fpw in you program files.
Message
 
 
To
04/05/1998 14:20:09
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00096797
Message ID:
00097349
Views:
16
Hi Robert,

Lets start at the beginning with where VFP looks for a config file. By default, VFP looks in the startup directory for a config file. For many developers, the startup folder is \program files\devstudio\vfp. However, if you create a shortcut and specify a Start in folder, if a Config.fpw file exists there, that is the one that VFP will use. This is a handy feature in that you can specify specific config files for a project.

On a command line basis, you can always override the default config file by specifiying one with the -C switch. For example:

c:\myapp.exe -Cc:\temp\config.fpw.

If you decide to not use the name config.fpw, you need to do this since VFP looks only for a file named config.fpw

The only time the -C will not work is if you bind the config.fpw file in your EXE. If you bind a config.fpw - aka including it in your project - you do not need to anything with the command line. Just call the exe. regardless of your start up directory - VFP will use the config.fpw file bound into the EXE. As Craig said, if you need control over configuration, make sure to not include the config.fpw file into your project. However, if your config file will be static, bind it in. It is one less headache you will need to deal with.

OK, lets say you don't specify a startup folder, and you did not use the -C argument, and a config.fpw file is not in the same directory as your exe. Where does VFP look for the config.fpw file? In this case, it will be either the windows system or system32 directory - whichever applies. However, if you specify the folder that contains your EXE as the start-in folder and a config.fpw, you do not need to use the -C switch.

HTH
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform