INtime SDK Help
Environment variables
INtime SDK v7.1 > About INtime > INtime Kernel > Environment variables

Each loaded process starts with an identical set of environment variables. Modifying a process environment affects only that process. Environments are not currently inherited on process creation.

On INtime for Windows, the environment is determined by the contents of the "Node Management->Advanced->CLIB" section and the value of certain Windows environment variables if they exist.

On INtime Distributed RTOS, the environment is determined by the [CLIB] section of the rtconfig.sys file.

Note that some Windows-sourced environment variables may have different values depending on how the application is loaded. If a process is loaded by the logged-in user or from an INtime application while a user is logged in, the environment variables are copied from the environment of the logged-in user. If an application is loaded by the autoloader, or while no user is logged in to Windows, then the environment variables are copied from those of the SYSTEM user. This is because the autoloader is run by the INtime Kernel Service which runs in the context of the SYSTEM user. If no user is logged in then a process loaded from an INtime application will be loaded by the INtime I/O service, which also runs in the context of the SYSTEM user.

An example of an environment variable which changes depending on the user context is the TEMP variable which indicates the folder where temporary files are stored. The SYSTEM user value for this variable is typically C:\Windows\temp. A logged-in user TEMP path is typically C:\users\USERNAME\AppData\Local\temp.

Common environment variables

INTIME
The root path of the INTIME installation
TEMP
The path to the temporary working directory
TZ
POSIX format time zone string
NODECFG
The path to configuration files for this node

INtime for Windows additional variables

USERNAME
Windows user name
USERPROFILE
The path to the Windows user profile

INtime Distributed RTOS additional variables

PATH
The search path for loading RSLs

Legacy Network stack variables

DEFHOSTNAME
The default host name for this network node
HOSTSFILE
The path to the 'hosts' file
NETWORKSFILE
The path to the 'networks' file
PROTOSFILE
The path to the 'protocols' file
SERVICESFILE
The path to the 'services' file
INTIMEVEMACADDR
The MAC address for the legacy virtual ethernet adapter driver

Environment system calls

To . . . Use this system call . . .
Return the value of an environment variable by name GetRtEnvironmentVariable
Return the value of an environment variable by its index GetRtEnvironmentVariableByIndex
Create a new environment variable or modify an existing one PutRtEnvironmentVariable
Remove an environment variable from the current process DeleteRtEnvironmentVariable