在Windows10上安装scoop

scoop安装

设置scoop环境变量

1
2
$env:SCOOP='D:\Applications\Scoop'
[Environment]::SetEnvironmentVariable('SCOOP',$env:SCOOP,'User')

或者设置scoop global 环境变量

1
2
3
4
5
$env:SCOOP_GLOBAL='D:\Applications\Scoop'
[Environment]::SetEnvironmentVariable('SCOOP_GLOBAL',$env:SCOOP_GLOBAL,'User')
这个目录也是Scoop安装目录的默认目录(安装到当前用户),还可以修改全局安装的目录:
$env:SCOOP_GLOBAL='D:\GLOBALApplications\Scoop'
[Environment]::SetEnvironmentVariable('SCOOP_GLOBAL', $env:SCOOP_GLOBAL, 'Machine')

安装命令

1
2
3
4
5
6
7
8
9
10
11
12
13
 Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
Initializing...
Downloading scoop...
Extracting...
Creating shim...
Downloading main bucket...
Extracting...
Adding D:\Applications\Scoop\shims to your path.
'lastupdate' has been set to '2022-03-07T17:56:17.3046949+08:00'
Scoop was installed successfully!
Type 'scoop help' for instructions.
## 或者
iwr -useb get.scoop.sh|iex

添加bucket

本身的main bucket源很少,故增加新的一个较多的bucket

列出已知的bucket

1
2
3
4
5
6
7
8
9
10
scoop bucket known
main
extras
versions
nirsoft
php
nerd-fonts
nonportable
java
games

添加额外的安装源

1
2
3
4
5
scoop bucket add extras
  执行成功展示:

Checking repo... ok
The extras bucket was added successfully.

安装软件

安装软件

1
2
scoop install -g [app的名称]
## 我这里-g 需要admin权限,取消-g可安装

如:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
scoop install 7zip
WARN Purging previous failed installation of 7zip.
Uninstalling '7zip' ().
'7zip' was uninstalled.
Installing '7zip' (21.07) [64bit]
7z2107-x64.msi (1.8 MB) [===================================] 100%
Checking hash of 7z2107-x64.msi ... ok.
Extracting 7z2107-x64.msi ... done.
Running pre-install script...
op\apps\7zip\21.07
Creating shortcut for 7-Zip (7zFM.exe)
Persisting Codecs
Persisting Formats
'7zip' (21.07) was installed successfully!
Notes
"D:\Applications\Scoop\apps\7zip\current\install-context.reg"
输入以下命令可将7zip添加到右键
D:\Applications\Scoop\apps\7zip\current\install-context.reg
也可以打开“D:\Applications\Scoop\apps\7zip\21.07”文件夹里面的
7zFM.exe

工具-->选项-->7-zip选中添加到”右键