Tsukasa
Tsukasa

Reputation: 6552

Can't echo environment variables

Can't seem to figure out where i'm going wrong here. I'm writing a script where I need to store a value for the next time in runs.

From the command line I try the following

setx -m test tesing
SUCCESS: Specified value was saved
echo %test%

returns

%test%

I have also tried this without -m and I can see the variables in the list in windows. What am I missing here?

Upvotes: 5

Views: 5090

Answers (1)

Shon
Shon

Reputation: 126

The variable will apply to new processes - launch a new cmd.exe and "echo %test%", observe the expected output. (Tested on Windows 7)

Upvotes: 7

Related Questions