2017-01-27 2 views
1

Windows 10에서는 Wgetchoco install wget으로 설치했습니다.Windows의 Wget 경로 환경 변수

그런 다음 경로 환경 변수 (설치시 C:\ProgramData\chocolatey\lib\Wget\tools)에 wget.exe 위치 폴더를 추가했습니다.

wget : The remote name could not be resolved: '--help' 
At line:1 char:1 
+ wget --help 
+ ~~~~~~~~~~~ 
    + CategoryInfo   : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException 
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand 

방법 :

그러나,를 Wget 내가 wget.exe --helpwget.exe [any_link]

wget --help 오류를 입력하면 그들이에만 작동, 바로 작동하지 않는 wget --helpwget [any_link] 같은 PowerShell을/cmd를 사용하여 명령 명시적인 .exe 확장을 사용 중지 하시겠습니까? 나는 이것이 사소한 문제라는 것을 알고 있지만 Wget을 자주 사용하지 않을 때마다 성가신 세부 사항을 회상하는 데 시간이 걸릴 때마다 ...

+0

가능한 복제 시도 [PowerShell을 통해 컬을 실행 - 인수를 구성하는 방법을 (http://stackoverflow.com/questions/30807318/running-curl-via-powershell-how-to-construct- 인수) – PetSerAl

+0

[스크립트에서 별칭 제거] (http://stackoverflow.com/questions/24347758/remove-alias-in-script)의 가능한 복제본 – Mofi

답변

0

이것은 Powershell에 이미 자체 wget 명령이 정의되어 있기 때문에 가능합니다. Invoke-WebRequest cmdlet의 별칭입니다. 별명을 제거하면 파일 확장자없이 wget.exe 명령을 사용할 수 있습니다. 단지의

Remove-Item Alias:wget 
wget --help