Returns the name and location of the Visual FoxPro internal and external configuration files.
SYS(2019 [, 1 | 2]) |
Parameters
Parameter | Description |
---|---|
1 |
(Default) Include this parameter to return the name and location of Config.fpw, the external Visual FoxPro configuration file. Issuing SYS(2019,1) is equivalent to issuing SYS(2019) without any parameters. |
2 |
Include this parameter to return the name and location of the internal configuration file. |
Return Value
Character
Remarks
The Visual FoxPro external configuration file is named Config.fpw, and it is not installed by default. You can create your own Config.fpw configuration file with MODIFY FILE.
If an internal or external configuration file cannot be located, SYS(2019) returns an empty string.
The Visual FoxPro external configuration file is typically located in the directory where Visual FoxPro, or a Visual FoxPro application, is started, but can be located elsewhere. Visual FoxPro first looks for it in the startup directory. If the configuration file is not located in the startup directory, the MS-DOS path is searched. When you start Visual FoxPro or a Visual FoxPro application, you can also use the -C switch to designate an external configuration file. Include the location and name of the configuration file immediately after -C.
For Visual FoxPro applications, you can also create an internal configuration file, which is built into the application's executable file. The internal configuration file must be called Config.fpw. When an internal configuration file is used, it will be read by default and any external configuration file that may exist will be ignored. You can allow your Visual FoxPro application to read an external configuration file after reading the internal configuration file by using the ALLOWEXTERNAL directive in the internal configuration file. When you include the setting ALLOWEXTERNAL=ON in the internal configuration file, Visual FoxPro searches for an external configuration file using the search criteria listed above, and reads its settings. The -C startup switch is ignored when used with an application that includes an internal configuration file unless the ALLOWEXTERNAL=ON setting is included in the internal configuration file.
Note: |
---|
For .exe and .dll file servers, Visual FoxPro supports only configuration files that are bound inside the server. Therefore, Visual FoxPro disregards the ALLOWEXTERNAL setting. |
For more information about command-line switches, see How to: Use Command-Line Options When Starting Visual FoxPro.
The settings in an external configuration file take precedence over those in the internal configuration file, if duplicate settings exist, because the external configuration file is read after the internal file. Visual FoxPro does not begin initialization until it reads both files.
If you want to specify the configuration file as read-only, place the file in your project and mark it as Included. If you want to specify that the file can be modified, place the file in your project and mark it as Excluded. You can then distribute the file separately with your application or executable file. By convention, configuration files use the .fpw extension.
For more information, see Special Terms for Configuration Files and Setting Configuration Options at Startup.
For more information about the Visual FoxPro configuration file, see Customizing the Visual FoxPro Environment.