Last Updated:

windows下安装包工具Chocolatey

yiliang.dong
yiliang.dong 环境配置

安装前准备

默认是安装在c盘program file下面,通过设置环境变量修改默认安装路径

ChocolateyInstall=D:\apps\chocolate
ChocolateyToolsLocation=D:\chocospace\tools
ChocolateyLastPathUpdate=D:\chocospace\lastpathupdate

使用powershell运行安装命令

  • 从官方页面获取安装命令, https://chocolatey.org/install
  • 运行powershell,执行命令
    Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
    

Comments