With GNAT, you can obtain enviornment variables by the GNAT.OS_lib getenv function. E.g. with GNAT.OS_lib; ... function Get_env_string(name:String) return String is begin return GNAT.OS_lib.getenv(name).all; end;