How To Create New Environment Variables In Windows 11

TechHow ToHow To Create New Environment Variables In Windows 11

Creating new environment variables in Windows 11 is a straightforward process that can significantly enhance your system’s functionality and customization. Environment variables are essentially a set of dynamic values that can affect the way running processes on a computer behave. Here is a comprehensive guide on how to create, modify, and manage these variables:

compressed how to create new environment variables in windows 11

Accessing Environment Variables

  1. Through System Properties:
    • Press Windows + R and type sysdm.cpl to open System Properties.
    • Go to the Advanced tab and click on Environment Variables.
    • Here, you can view and set two types of variables: User variables (specific to your user account) and System variables (affecting all users).
  2. Using the Settings App:
    • Press Windows + I to open Settings.
    • Navigate to System > About and click Advanced system settings.
    • Select the Environment Variables button in the Advanced tab.
  3. Via the Command Line:
    • Open Windows Terminal or Command Prompt.
    • Use commands like set to create or modify variables temporarily and setx for permanent changes.

Also Read- 5 Ways To Fix WMI Provider Host (WmiPrvSE.exe) High CPU Usage On Windows 10/11

Creating and Editing Environment Variables

  1. Adding a New Variable:
    • In the Environment Variables window, under User or System variables, click New.
    • Enter the Variable name and Value. For instance, if you’re setting a path for a program, the Value would be the path to its executable file.
  2. Modifying Existing Variables:
    • Select a variable and click Edit.
    • You can change the Name and Value as needed.
  3. Path Variable:
    • The Path variable is crucial as it lists directories where executables might be found.
    • To add a new path, select the Path variable and click Edit. Then, add your new path.
  4. Using PowerToys:
    • PowerToys offers a more advanced and user-friendly interface for managing environment variables.
    • It allows creating variable profiles and easily switching between them.
  5. Setting Variables via PowerShell:
    • Launch PowerShell as an administrator.
    • Use [Environment]::SetEnvironmentVariable("VariableName", "Value") to create or modify variables.
  6. Deleting Variables:
    • In the Environment Variables window, select a variable and click Delete.

Tips and Considerations

  • User vs. System Variables: User variables only affect the current user, while System variables are global.
  • Using Environment Variables: You can access these variables in scripts, command lines, and various applications to dynamically reference system directories, user data paths, and more.
  • Refreshing Changes: After making changes to environment variables, you might need to restart your computer or application to apply these changes.
  • Security: Be cautious when modifying system variables, as incorrect settings can affect system stability.

Practical Applications

  • Software Development: Set paths for development tools or define project-specific variables.
  • System Management: Customize system paths or set global settings for software applications.

Also Read- How To Get the Classic Windows Start Menu On Windows 11


Environment variables in Windows 11 offer a flexible way to manage system settings and user preferences. By understanding how to create, edit, and manage these variables, you can significantly enhance your Windows experience and streamline various processes. Remember, while modifying environment variables, always ensure you understand the purpose of each variable to avoid system issues.

Neil S
Neil S
Neil is a highly qualified Technical Writer with an M.Sc(IT) degree and an impressive range of IT and Support certifications including MCSE, CCNA, ACA(Adobe Certified Associates), and PG Dip (IT). With over 10 years of hands-on experience as an IT support engineer across Windows, Mac, iOS, and Linux Server platforms, Neil possesses the expertise to create comprehensive and user-friendly documentation that simplifies complex technical concepts for a wide audience.
Watch & Subscribe Our YouTube Channel
YouTube Subscribe Button

Latest From Hawkdive

You May like these Related Articles


Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.