Environment Variables Unit
|Date:||30 January 2014|
About the Unit
This unit provides a static class for reading and modifying the environment variables available to the current process, along with a class that can be used to enumerate environment variable names.
The unit also contains a component and a set of routines that duplicate some of the features provided by the static class. These are now deprecated and are provided for backward compatibility reasons only: they should no longer be used in new code.
The Environment Variables Unit has been tested on all Delphi versions from 7 to XE4, excluding Delphi 2005. The unit is thought to be compilable with versions of Delphi back to version 4, but this has not been tested.
The unit is compatible with both the Windows 32- and 64-bit Delphi compilers and the VCL and FireMonkey frameworks (tested with FireMonkey 2 only).
.NET and non-Windows platforms are not supported.
The Environment Variables Unit has comprehensive online documentation.
In addition, the unit is well documented with comments in XMLDoc format.
Two different demo programs are included in the
Demos\2 sub-directories. There are VCL and FireMonkey 2 versions
of each demo.
The demo programs are documented in the file
can be found in the
How it works
This unit uses ideas from my article "How to access environment variables". The article shows how to develop routines similar to some of those in this unit and discusses their operation.
Feedback & Queries
If you find any bugs or want to suggest a new feature please report them using the Issue Tracker.
Click the Create Ticket button to create a ticket then complete the
form giving as much information as possible. Please note:
this issue tracker is shared among all the projects in the DelphiDabbler
Code Library, so please make sure you enter
envvars in the
Project edit box. You should also choose
Defect in the
Type drop down list to report a bug or
request a new feature.
If you have created a bug fix or have implemented a new feature please attach a zip file to your ticket that contains your source code.
Should you have any queries about using the components please read the documentation.
If you can't find an answer in the documentation then post a message in the discussion group.