Environment variables are strings that contain information such as drive, path, or file name etc. They control the behaviour of various programs. Below is a list of some environment variables compiled.
In Windows, there are basically, two types of environment variables which are as follows.
– User Environment variables: This can be modified by both the users and administrator while the
– System Environment Variables,. Here only the system admin(s) can modify it.
|%CommonProgramFiles%||C:\Program Files\Common Files|
|%CommonProgramW6432%||C:\Program Files\Common Files|
|%DATE%||The current date in the format determined by Date command|
|%ERRORLEVEL%||Number defining exit status of previous command or program|
|%ProgramFiles(x86)%||C:\Program Files (x86)|
|%PROMPT%||Code for current command |
|%TIME%||Current time in format|
Note: It is vital to point out that the following User and System Environment Variable
– User Environment Variables: These variables are different for every user of a particular computer. The variables include any that are set by the user, as well as any variables defined by programs, such as the path to the location of the program files.
– System Environment Variables: Administrators can change or add environment variables that apply to the system as a whole, and thus to all system users.
With the command “Get-ChildItem Env:“, you can view the list of available environment variables as shown below.
Note: These variables can be modified from PowerShell on the fly and can also be modified via the registry settings.
See the link below for how this is configured via Advanced System Settings https://techdirectarchive.com/2018/07/13/windows-error-not-reconginsed-as-an-internal-or-external-program/