Windows

Environment variables in Windows 10

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.

Environment VariablesValues
%ALLUSERSPROFILE%C:\ProgramData
%APPDATA%C:\Users\(user-name)\AppData\
Roaming
%CommonProgramFiles%C:\Program Files\Common Files
%CommonProgramW6432%C:\Program Files\Common Files
%COMPUTERNAME%techirectarchive
%COMSPEC%C:\Windows\System32\cmd.exe
%DATE%The current date in the format determined by Date command
%ERRORLEVEL%Number defining exit status of previous command or program
%HOMEDRIVE%C:
%HOMEPATH%C:\Users\(user-name)
%LOCALAPPDATA%C:\Users\(user-name)\
AppData\Local
%LOGONSERVER%\\MicrosoftAccount
%ProgramData%C:\ProgramData
%ProgramFiles%C:\Program Files
%ProgramFiles(x86)%C:\Program Files (x86)
%ProgramW6432%C:\Program Files
%PROMPT%Code for current command
prompt format.
%PUBLIC%C:\Users\Public
%SystemDrive%C:
%SystemRoot%C:\Windows
%TEMP%C:\Users\(user-name)\AppData\
Local\Temp
%TIME%Current time in format
%TMP%C:\Users\(user-name)
\AppData\Local\Temp
%USERDOMAIN%techirectarchive
%USERDOMAIN_ROAMINGPROFILE%techirectarchive
%USERNAME%(user-name)
%USERPROFILE%C:\Users\(user-name)
%WINDIR%C:\Windows

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/

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x