How the SDM's Current Directory is Set


If the SDM is started by the user (by double clicking on the executable or on a short cut on the desk top), its current directory is initially the one that contains the SDM executable.  If the SDM is started by a client, i.e. via the registry, its current directory is initially determined by the flavor of the operating system, i.e. 98, NT, etc. For example, on Windows NT the SDM's current directory will be the System Directory.

Thus, for applications where:

A client that launches the SDM can force the SDM's current directory to be anywhere on the file system by creating a file called "RMSdataDir.txt" in a top-level directory named "Temp" on the first fixed drive on the system (usually C:), e.g. "C:\Temp\RMSdataDir.txt", prior to launching the SDM.   This file must contain the following string:


where path is a full path to the directory that is to become the current directory.  The SDM looks for the file "RMSdataDir.txt" and, if found, changes its current directory to path, prior to looking for the "Support" directory.  

If the SDM is launched first and it finds a "Support" directory parallel to the current directory (i.e. the directory that contains the SDM executable), the SDM will create the "RMSdataDir.txt" file, with path being the full path to the current directory.

Regardless of whether the "RMSdataDir.txt" file is created by a client or the SDM, the SDM deletes the file upon termination.

The current directory is also the logical place to put map datasets and other application-specific files (or directories containing them). This is particularly the case for applications with multiple clients.  Such clients have a uniform method of locating application-specific input files, via "RMSdataDir.txt".