Get Origin program path or the user file folder path.
string GetAppPath( BOOL bServerPath = FALSE )
A string containing the requested path.
// This is a self contained sample program for the function GetAppPath,
// To run the program, enter the following command in the Script window:
// When you run this program in the normal Origin environment,
// the following meassage will be printed:
// OK: System header(wksheet.h) IS in the Program path.
// OK: System header(wksheet.h) is NOT in the User Files path.
string strOFile = GetAppPath(TRUE) + "originc\\system\\wksheet.h"; // in Origin's program path
string strUFile = GetAppPath(FALSE) + "originc\\system\\wksheet.h"; // in User Files path
printf(" OK: System header(wksheet.h) IS in the Program path.\n");
printf(" NO: System header(wksheet.h) is NOT in the Program path. It should!\n");
printf(" NO: System header(wksheet.h) IS in the User Files path. It shouldn't!\n");
printf(" OK: System header(wksheet.h) is NOT in the User Files path.\n");
Get Origin's software path including the last '\\' character.
Origin's program path is typically where Origin's EXE and DLL files are located. In a network version, this is typically a remove path on a server computer where the server version of Origin is installed. In a single user installation, this is always the location where Origin's EXE and DLL files are installed. Origin C system files are always installed inside the program path.
Origin's User Files path is typically assigned by the user when running Origin for the first time. It is either in the operating system's Application Data path (e.g., C:\Documents and Settings\myLogInName\Application Data\OriginLab\) or a Custom Folder (e.g., D:\myOriginFolder\myLoginName\). This is where all the files related to a particular customization of Origin are located. You will find origin.ini and other templates and CNF files in this location.