Setting and Using Environment Variables in the windows environment

Overview

The syntax used to set and use environment variables in the windows environment differs from the syntax used in other environments. 

 

How to set environment variables using the command line in the windows environment: 

You can set an environment variable using `setx`. To set an environment variable you can use the following syntax: 

setx [variable_name] "[variable_value]"

 

How to use environment variables in the windows environment:

To use environment variables in the windows environment, you must use the following syntax: 

$Env:variable_name

 

Was this article helpful?
1 out of 1 found this helpful

Comments

0 comments

Article is closed for comments.