2
I need to create an environment variable in windows, through a batch.
I can 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?
2
I need to create an environment variable in windows, through a batch.
I can 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?
2
To create an environment variable it is necessary to have administrator privileges, so just use the command setx
Example:
setx NOME valor
Browser other questions tagged batch
You are not signed in. Login or sign up in order to post.
And if I want to delete this variable in the future, which command do I use?
– Laércio Lopes
Thanks @rray :)
– David
@Laércio Lopes REG delete HKCU Environment /F /V NAME removes the variable.. more details on that reply
– It Wasn't Me