2017-01-27 14 views
1

Windows 10では、Wgetchoco install wgetでインストールしました。Windows上のWget Path環境変数

次に、wget.exeロケーションフォルダをパス環境変数(インストール時にはC:\ProgramData\chocolatey\lib\Wget\tools)に追加しました。

しかし、Wgetはwget --helpwget [any_link]はすぐに動作しないように、彼らは私がwget.exe --helpwget.exe [any_link]

wget --helpエラー入力した場合にのみ動作し、PowerShellの/ CMDを使用してコマンド:どのように

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 

を明示的に.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コマンドレットのエイリアス。エイリアスを削除すると、ファイル拡張子なしでwget.exeコマンドを使用できます。ただの

Remove-Item Alias:wget 
wget --help 
関連する問題