I have declared an environment variable named DB_PASSWORD in the windows command prompt, when I run echo %DB_PASSWORD% it returns the exact value I just set but when I run another command prompt in the same directory alongside the first command prompt and try to access the variable, It does not give me the variable I set,
My question is how does the environment variables work on this particular issue and how I can access a variable in all Instance of windows command prompt because sometimes I found it useful having more than one instance of cmd opened side to side
commands images
Asked
Active
Viewed 21 times
0
Omega Joctan
- 1
- 1
-
1Does this answer your question? [Setting a system environment variable from a Windows batch file?](https://stackoverflow.com/questions/3803581/setting-a-system-environment-variable-from-a-windows-batch-file) – MouseMoosz Feb 02 '22 at 09:40