[新软件] windows自己开发的包管理winget
date
Nov 24, 2022
slug
newsoftware-winget-windows-package-installer
status
Published
summary
新软件 类似mac的brew
tags
software
type
Post
URL
Summary
安装过程
截图
Summary
源的问题
如果有proxy要global 全局代理 + USA,不然会有这种失败
# administrator mode
winget source reset --force
安装过程
- 直接从microsoft store当中安装 (https://apps.microsoft.com/store/detail/应用安装程序/9NBLGGH4NNS1?hl=zh-hk&gl=hk)
Export & Import
# https://learn.microsoft.com/en-us/windows/package-manager/winget/export
winget export -o <output> [<options>]
# https://learn.microsoft.com/en-us/windows/package-manager/winget/import
winget import [-i] <import-file> [<options>]
使用
# 打开powershell
# help
winget
#
winget search "any-package-name"
winget install <FullPackageID>
# show all installed packages (by winget or not)
winget list
winget show <FullPackageID>
winget uninstall <FullPackageID>
# upgrade
# simply shows if any newer versions of installed packages are available
winget upgrade
# upgrade all
winget upgrade --all
winget upgrade --all --include-unknown
winget upgrade <FullPackageID>
# Managing Software Repositories
winget source list
winget source update
配置
winget settings
{
"$schema": "https://aka.ms/winget-settings.schema.json",
// For documentation on these settings, see: https://aka.ms/winget-settings
"source": {
"autoUpdateIntervalInMinutes": 5
},
"visual": {
"progressBar": "rainbow"
// 三种样式可选:accent(默认值)、 retro、 rainbow
},
"installBehavior": {
"preferences": {
"architectures": ["arm64", "x64"]
// "architectures": ["x64", "arm64"]
}
},
"experimentalFeatures": {
"directMSI": true
},
"experimentalFeatures": {
"zipInstall": true
},
"installBehavior": {
"preferences": {
"locale": ["zh-CN","en-US"]
}
},
}