currentUserPath
Contains the full path to the current user's private dBASE folder or private dBASE application folder.
Property of
_app object
Description
currentUserPath is set during startup to a subfolder of the current user's private folder tree where the user's private program settings may be kept and any temporary files can be created, used, and deleted.
Many operating systems, including Microsoft Windows, setup a private folder tree for each user in which their personal files, program settings, and temporary files can be kept.
In Windows XP, the private user folders are located under C:\Documents and Settings.
In newer versions of Windows, the private user folders are located under C:\Users
For dBASE Plus and dBASE applications, a user's private program settings are stored in an .ini file.
- When running dBASE Plus, these settings are stored in a file named plus.ini
- When running an application .exe, these settings are stored in an .ini file named after the application .exe file. For myapp.exe, the .ini file would be named myapp.ini.
The default location for these .ini files is the path contained in currentUserPath.
Note that property _app.inifile contains the full path to the .ini file including the name of the .ini file.
For example, for a user with Windows username: jsmith
? _app.inifile returns..
C:\Users\jsmith\AppData\Local\dBASE\PLUS\BIN\Plus.ini
How currentUserPath is set :
During startup dBASE or the dBASE runtime engine retrieves the current user's private folder path from Windows. The Windows designation for this path is: CSIDL_LOCAL_APPDATA.
The path retrieved looks something like:
C:\Users\jsmith\AppData\Local\
Next, the subpath is determined based on the folder from which dBASE or an application .exe was launched.
If launched from under \Program Files or \Program Files (x86), the path remaining after dropping this initial folder is appended to the user's private folder path.
For example, for user jsmith, running dBASE Plus from its default location:
C:\Users\jsmith\AppData\Local\dBASE\PLUS\BIN
If launched from some other folder, the path remaining after dropping the initial drive specifier or UNC path is appended to the user's private folder path.
For example, for user jsmith, running a dBASE application from:
C:\MyApp\myapp.exe
currentUserPath will be set to:
C:\Users\jsmith\AppData\Local\MyApp