windows - CMD enviroment variables not expanded in PATH variable -
i've enviroment variables set in sistem preferences (windows 8.1). if start cmd.exe , execute commands:
c:\users\carlo>echo %grails_home% d:\grails c:\users\carlo>echo %gradle_home% d:\gradle c:\users\carlo>echo %groovy_home% d:\groovy c:\users\carlo>echo %path% c:\programdata\oracle\java\javapath;c:\program files (x86)\intel\iclsclient\; c:\program files\intel\icls client\;c:\windows\system32;c:\windows; c:\windows\system32\wbem;c:\windows\system32\windowspowershell\v1.0\; c:\program files\intel\intel(r) management engine components\dal; c:\program files\intel\intel(r) management engine components\ipt; c:\program files (x86)\intel\intel(r) management engine components\dal; c:\program files (x86)\intel\intel(r) management engine components\ipt; c:\program files\intel\wifi\bin\;c:\program files\common files\intel\wirelesscommon\; c:\program files (x86)\brackets\command;%grails_home%\bin;%gradle_home%\bin; %groovy_home%\bin why last 3 variables not expanded in path?
complete path variable is:
c:\programdata\oracle\java\javapath;c:\program files (x86)\intel\icls client\;c:\program files\intel\icls client\;%systemroot%\system32;%systemroot%;%systemroot%\system32\wbem;%systemroot%\system32\windowspowershell\v1.0\;c:\program files\intel\intel(r) management engine components\dal;c:\program files\intel\intel(r) management engine components\ipt;c:\program files (x86)\intel\intel(r) management engine components\dal;c:\program files (x86)\intel\intel(r) management engine components\ipt;c:\program files\intel\wifi\bin\;c:\program files\common files\intel\wirelesscommon\;c:\program files (x86)\brackets\command;%grails_home%\bin;%gradle_home%\bin;%groovy_home%\bin
environment variables (envvars) name state: variables; have name , value (in windows value string).
so in example name path , value string listed. os (command interpreter) doesn't have idea semantics of envvar value when expands var name shows value. doesn't analyze value , recursively expand other variables may there.
if variables defined in other variables (something wouldn't recommend) consumer's job expand of them.
a common c function deals envvars (maybe help): expandenvironmentstrings
Comments
Post a Comment