명령 프롬프트에서 만든 환경 변수를 참조하는 영구 환경 변수를 만들려고합니다. 이것은 내가 할 노력하고있어 보여줍니다사전 정의 된 환경 변수가 동적으로 작성된 환경 변수를 참조 할 수 있습니까?
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\testuser>echo %HTTP_PROXY%
http://%user%:[email protected]%proxyip%:8080
C:\Users\testuser>set user=testuser
C:\Users\testuser>set password=testpass
C:\Users\testuser>set proxyip=10.20.10.100
C:\Users\testuser>echo %HTTP_PROXY%
http://%user%:[email protected]%proxyip%:8080
내가
http://testuser:[email protected]:8080
이 가능하게 할 수있는 방법이 있나요를 인쇄 할 최종 에코 문을 기다리고 있었다
?
이 게시물은 어리석은 것처럼 보일 수 있습니다. 그러나이 게시물에 대한 이유는 Windows 환경 변수를 통해 암호를 게시하고 싶지 않고 명령 프롬프트에서이 변수를 정의하여 긴 URL 변수를 사용하려고하고 긴 변수를 기억하고 싶지 않기 때문입니다. – Chinmay
Windows 명령 프롬프트가 DOS가 아닙니다. –
환경 변수는 문자열입니다. 그들은 동적으로 평가되지 않습니다. –