windows包管理器总结

发布于 2020-04-19  1597 次阅读


1. scoop

  1. 安装前提:
    1. 用户名不含中文字符
    2. windows7+ or windows server 2008+
    3. powershell 3+
    4. .net 4.5+ (实际测试4.0有时也可)
      检查版本:
  2. 管理员运行power shell,输入以下代码
$PSVersionTable.PSVersion.Major   #查看Powershell版本
$PSVersionTable.CLRVersion.Major  #查看.NET Framework版本
  1. 开始安装
    1. 解决权限问题:
Set-ExecutionPolicy RemoteSigned -scope CurrentUser

选择全是
2.正式安装

iwr -useb get.scoop.sh | iex

如需删除或重装,先删除C:\\scoop 文件夹

2. choco

  1. 安装前提:
    1. .NET Framework 4.0 PowerShell 2.0+(旧)
    2. Windows 7+/Windows 2003+ (Server Core also, but not Windows Nano Server)
    3. Windows PowerShell v2+ (not PowerShell Core aka PowerShell 6 yet)
    4. .NET Framework 4.x+
    5. 磁盘空间15 MB(收费企业版10M)
    6. 如果是GUI版需要预留50-100 MB
      检查版本:
  2. 管理员运行power shell,输入以下代码
$PSVersionTable.PSVersion.Major   #查看Powershell版本
$PSVersionTable.CLRVersion.Major  #查看.NET Framework版本
  1. 安装:
    1. 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://chocolatey.org/install.ps1'))
  1. cmd:
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

食用方法

choco/scoop install #软件    
choco/scoop uninstall #软件  
#PS: scoop config proxy IP:porn  

建议:

对于GUI和强权限建议官网下载手动安装,例:docker,7zip
对于版本切换,以及环境变量配置建议包管理器安装,例:nodejs,jdk,python;


努力决定态度,态度决定高度.