在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 | Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh') |
添加bucket
本身的main bucket
源很少,故增加新的一个较多的bucket
列出已知的bucket
1 | scoop bucket known |
添加额外的安装源
1
2
3
4
5scoop bucket add extras
执行成功展示:
Checking repo... ok
The extras bucket was added successfully.
安装软件
安装软件
1 | scoop install -g [app的名称] |
如:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20scoop 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
选中添加到”右键
“