IT:AD:SetX

Summary

When you launch a CommandLine Shell, it copies the User and Environment Variables into the current shell.

Any SET you do there is only temporary, and get lost when the Shell is closed. They won't affect any parrallel or future shells.

A way to permanently SET variables is to use SETX.

Process

Set User variables:

SETX varName VarValue

Set Machine environment variables (but does need shell to be running as Admin):

SETX /m varName varValue

Resources