Contains the full path to the current user's roaming dBASE folder or roaming dBASE application folder

Property of

_app object

Description

roamingUsersPath is set during startup to a subfolder of the current user's roaming user profile folder tree where the user's roaming program settings may be kept.

When connected to a Windows network where roaming user profiles are enabled, you can set up a roaming user profile in Microsoft Windows for each user in which their personal files, program settings, and other files can be kept and updated on a server.

When logging into a Windows server via a local workstation, the user's roaming profile files will be copied from the server to the local workstation.

When logging out, the user's roaming profile files are copied back up to the server.

 

   In Windows XP, the roaming user profile  folders are located under:

 C:\Documents and Settings\<username>\application data\.

 

   In newer versions of Windows, roaming user profile  folders are located under:

 C:\Users\<username>\AppData\Roaming\

 

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.

 

How to enable a dBASE application to use roamingUsersPath:

    When building an application specify: INI ROAM in the BUILD command.

    For Example:

       BUILD myapp.pro to myapp.exe INI ROAM

 This will enable the application to automatically use the path in _app.roamingUsersPath  to set the location for its .ini file.  This path will be copied into _app.inifile during application startup.

 In the dBASE Project Explorer, this can be set by choosing the "Roaming" option for the INI Type? setting on the Project tab.

 Caution - in order for roaming profiles to work correctly, any paths stored in an application's .ini file must be valid on any workstation the user chooses to work from.

How roamingUsersPath is set :

During startup dBASE or the dBASE runtime engine retrieves the current user's roaming user profile folder path from Windows.  The Windows designation for this path is: CSIDL_APPDATA.

The path retrieved looks something like:

   C:\Users\jsmith\AppData\Roaming

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 roaming profile folder path.

   For example, for user jsmith, running dBASE Plus from its default location:

      C:\Users\jsmith\AppData\Roaming\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 roaming profile folder path.

   For example, for user jsmith, running a dBASE application from:

      C:\MyApp\myapp.exe

      roamingUsersPath will be set to:

         C:\Users\jsmith\AppData\Roaming\MyApp