Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Windows » How to create an Environment variables in Windows
  • wacxx
    How to set up System Insights on Windows Admin Center Windows Server
  • selinux in production
    How to locate directory file context and restore it with SELinux Linux
  • azure 1
    Fix SSO sign-in and non-routable domain issues AWS/Azure/OpenShift
  • image 26
    Add an EBS volume to AWS EC2 via the AWS Console and CLI AWS/Azure/OpenShift
  • Nextcloud installation on macOS
    How to install Nextcloud on Mac JIRA|Confluence|Apps
  • servicechannels3 1
    Long Term Servicing Branch vs Semi-Annual Channel Windows
  • Leave Slack
    How to remove a user from a Slack Channel JIRA|Confluence|Apps
  • windows hello la gi
    All you need to know before deploying Windows Hello for Business Key and Certificate Trust Windows

How to create an Environment variables in Windows

Posted on 15/03/202008/09/2025 Christian By Christian No Comments on How to create an Environment variables in Windows
Environment variables

Environment variables are strings that contain information such as drive, path, or file name, etc. They control the behavior of various programs. In this article, we shall discuss how to create an Environment variables in Windows. Please, see Logon Failure: User has not been granted the requested logon type, how to troubleshoot Server Certificate could not be updated: Private key does not match, and how to Fix Error 0x87E10BC6 on a PC running Windows non-core Edition

Below is a list of some environment variables compiled. An environment variable is a dynamic “object” on a computer, containing an editable value, which may be used by one or more software programs in Windows.

Environment variables help programs know what directory to install files in, where to store temporary files, and where to find user profile settings.

In Windows, there are basically, two types of environment variables: user environment variables (set for each user) and system environment variables (set for everyone). By default, a child process inherits the environment variables of its parent process

Please, see Shell Scripting: How to Automate a Process in Linux, How to Secure your API key in Postman, and how to install Ansible on Windows with Cygwin.

User Environment variables:

Furthermore, this can be modified by both the users and administrator. While the System Environment Variables: Here only the system admin(s) can modify it.

Windows 10

Please, see the table below for detailed information of the query above.

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. However, The variables include any that the user sets and any variables defined by programs, such as the path to the location of the program files.

Please, see “The term “git” was not used as the name of a cmdlet, function, script file, or executable Program recognized“, and “How to Fix Python was not found run without arguments to install from the Microsoft Store“.

System Environment Variables

Moreover, Administrators can change or add environment variables that apply to the system as a whole and thus to all system users.

In addition, With the command “Get-ChildItem Env:“, you can view the list of available environment variables as shown below.

Note: Nonetheless, These variables can be modified from PowerShell on the fly and can also be modified via the registry settings.

Consequently, See the how to install Ansible on Windows with Cygwin for how this is configured via Advanced System Settings

Nevertheless, I hope you found this blog post on how to create an Environment variables in Windows helpful. Therefore, Please let me know in the comment session if you have any questions.

5/5 - (1 vote)

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
Windows

Post navigation

Previous Post: How to reset and reinstall Windows 10 locally
Next Post: Windows Management Instrumentation Commands

Related Posts

  • ycx
    Install SysInternals from the Microsoft Store Windows
  • 1 WeXxkEX0JG3oB781HD8Hrg 1
    OOBESETTINGSMULTIPLEPAGE error on Windows 10 Windows
  • Fix Boot Failed UEFI SCSI Device on HyperV
    How to Fix Boot Failed UEFI SCSI Device on HyperV Virtualization
  • screenshot 2020 03 07 at 22.25.21
    How to export and import User Profile – FrontFace Lockdown Tool Windows
  • Screenshot 2020 06 15 at 21.08.38
    How to allow saved credentials for RDP connection Windows
  • Screenshot 2020 06 25 at 22.51.15
    Why is Data recovery is almost impossible from an overwritten Hard Drive Windows

More Related Articles

ycx Install SysInternals from the Microsoft Store Windows
1 WeXxkEX0JG3oB781HD8Hrg 1 OOBESETTINGSMULTIPLEPAGE error on Windows 10 Windows
Fix Boot Failed UEFI SCSI Device on HyperV How to Fix Boot Failed UEFI SCSI Device on HyperV Virtualization
screenshot 2020 03 07 at 22.25.21 How to export and import User Profile – FrontFace Lockdown Tool Windows
Screenshot 2020 06 15 at 21.08.38 How to allow saved credentials for RDP connection Windows
Screenshot 2020 06 25 at 22.51.15 Why is Data recovery is almost impossible from an overwritten Hard Drive Windows

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a
 
  • wacxx
    How to set up System Insights on Windows Admin Center Windows Server
  • selinux in production
    How to locate directory file context and restore it with SELinux Linux
  • azure 1
    Fix SSO sign-in and non-routable domain issues AWS/Azure/OpenShift
  • image 26
    Add an EBS volume to AWS EC2 via the AWS Console and CLI AWS/Azure/OpenShift
  • Nextcloud installation on macOS
    How to install Nextcloud on Mac JIRA|Confluence|Apps
  • servicechannels3 1
    Long Term Servicing Branch vs Semi-Annual Channel Windows
  • Leave Slack
    How to remove a user from a Slack Channel JIRA|Confluence|Apps
  • windows hello la gi
    All you need to know before deploying Windows Hello for Business Key and Certificate Trust Windows

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,841 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.