Environment & Runtime

The ApplicationInfo object provides details about the host environment and the running application.

Environment Variables

You can read or set environment variables using indexed property access.

var path := ApplicationInfo.EnvironmentVariable['PATH'];
if path <> '' then PrintLn('Path found');
Result
Path found

Executable Information

Useful for determining file locations relative to the server binary.

var exe := ApplicationInfo.ExeName;
if exe.Contains('DWSWebServer') then PrintLn('Running on DWSWebServer');
Result
Running on DWSWebServer

Related Reference

For more details on runtime environment properties, see the reference documentation:

On this page