Tuesday, February 3, 2015

batch file - Set enviroment variable setx

I am setting a environment variable with setx(win7) in a cmd , that I started from a batch file, if I close the shell an open a new from batch file again and use Set command to check it, I do not get this new variable. I can see the variable via windows and regedit, had someone an Idea what I do wrong?


EG.

Batch:


Rem set some local variables


Set varableA="test"


...


Start /B cmd.exe /k


In the opened shell:


Setx -m variableB value --> set system envirtomet vartiable


Close shell an run batch again


In the new shell:


Set var


And thgerre is not variableB but in Windows an registry I can see it

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...