当我安装`Chocolatey`时,输入命令后什么也没发生

问题描述 投票:0回答:1

我在命令行中输入代码:

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

结果。enter image description here

windows chocolatey
1个回答
0
投票

我也遇到了同样的问题,但是通过这种方法,它工作正常。使用PowerShell方法->

在管理员命令提示符下输入这些代码->

powershell

Get-ExecutionPolicy

((如果受限制,则返回set-ExecutionPolicy AllSigned)

Set-ExecutionPolicy AllSigned

Get-ExecutionPolicy

> Set-ExecutionPolicy绕过-Scope Process -Force; [System.Net.ServicePointManager] :: SecurityProtocol = [System.Net.ServicePointManager] :: SecurityProtocol -bor 3072; iex(((新对象System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

有关更多参考,请访问此处https://chocolatey.org/docs/installation#install-using-powershell-from-cmdexe

下图清楚地说明了您必须执行的操作...

click me(for Image)

© www.soinside.com 2019 - 2024. All rights reserved.