How to create a windows environment variable

2

I need to create an environment variable in windows, through a batch.

Can I create a local variable with

set variavel=valor

But I need to access this value through other batch. how do I create a windows variable?

    
asked by anonymous 30.12.2016 / 14:10

1 answer

2

To create an environment variable, you need to have administrator privileges, so just use the setx

Example:

setx NOME valor
    
30.12.2016 / 14:12