似乎没有内置选项可以按可用升级或源进行过滤。
我已经尝试过,但它仍然列出了所有内容:
winget list --source winget
Run Code Online (Sandbox Code Playgroud) 我正在尝试在 Windows Server 2019(标准版,版本 1809,内部版本 17763)上安装 WinGet,但我无法让它工作......
当尝试此博客文章中的“直接安装”链接时,我收到以下链接ms-appinstaller:?source=https://aka.ms/getwinget
,但我的浏览器无法理解该链接,因为我没有应用程序安装程序。
因此,我Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle
从同一篇博客文章中提到的 GitHub 发布页面下载了该版本(其中应包含应用程序安装程序和 WinGet)。因为我的系统没有获取 .appxbundle 文件,所以我尝试使用 Powershell 安装它:
Add-AppxPackage ".\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle"
Run Code Online (Sandbox Code Playgroud)
但它抱怨它错过了Microsoft.VCLibs.140.00.UWPDesktop
:
Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF3, Package failed updates,
dependency or conflict validation.
Windows cannot install package Microsoft.DesktopAppInstaller_1.11.11451.0_x64__8wekyb3d8bbwe
because this package depends on a framework that could not be found. Provide the framework
"Microsoft.VCLibs.140.00.UWPDesktop" published by "CN=Microsoft Corporation, O=Microsoft
Corporation, L=Redmond, S=Washington, C=US", with neutral or x64 processor architecture and
minimum version 14.0.29231.0, …
Run Code Online (Sandbox Code Playgroud) 目前,通过winget提供的最新Python 3是3.10.150.0:
Name Id Version Match Source
-----------------------------------------------------------------------------------------------------------------------------------
Python 3 Python.Python.3 3.10.150.0 Command: python winget
Run Code Online (Sandbox Code Playgroud)
但我想安装 3.9 并继续使用 3.9。用winget可以做到吗?
我正在尝试远程为我们的计算机安装 sysinternals,但是当尝试安装时,winget install sysinternals --accept-source-agreements --accept-package-agreements
我收到“验证/请求包获取失败:找不到商店帐户”
尝试时winget install --help
我得到以下选项:
Windows Package Manager v1.1.12653
Copyright (c) Microsoft Corporation. All rights reserved.
Installs the selected package, either found by searching a configured source or directly from a manifest. By default, the query must case-insensitively match the id, name, or moniker of the package. Other fields can be used by passing their appropriate option.
usage: winget install [[-q] <query>] [<options>]
The following arguments are available:
-q,--query The …
Run Code Online (Sandbox Code Playgroud) 进入时winget source
(安装后),可以看到支持添加源。
winget source
提供以下子命令:
add Add a new source
list list current sources
update updates current sources
remove removes current sources
reset resets sources
Run Code Online (Sandbox Code Playgroud)
通过输入winget source list
,将显示默认源(只要源未更改):
C:\Windows\System32>winget source list
Name Arg
-----------------------------------------
winget https://winget.azureedge.net/cache
Run Code Online (Sandbox Code Playgroud)
由于可以使用 添加winget source add
源,如何创建源存储库?
存储库必须如何构建,或者是否没有足够的文档来回答这个问题?
我认为这个问题是 Stack Overflow 的主题,因为添加源的主要原因是(在我看来)为程序或类似程序创建 alpha/beta 通道。
我试图找到 Maven 的 winget ID,但似乎没有,因为两者
winget search -q maven
winget search -q mvn
Run Code Online (Sandbox Code Playgroud)
没有提供正确的结果。是没有还是我忽略了?
我正在尝试编写一个 PowerShell 脚本来设置 Windows 开发机器。我想使用 winget,但我没有看到任何使用命令行安装 winget 的简单方法。您必须使用 Windows 应用商店或从 github 下载 msxibundle。
Invoke-WebRequest -Uri https://github.com/microsoft/winget-cli/releases/download/v1.3.2691/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -OutFile .\MicrosoftDesktopAppInstaller_8wekyb3d8bbwe.msixbundle
Run Code Online (Sandbox Code Playgroud)
这两者都需要用户的交互,而不是仅仅运行脚本然后走开。有没有更好的办法?谢谢。
有没有办法只列出专门使用 winget 命令安装的软件包?
winget list
似乎显示了机器上安装的所有软件包。
我正在更换我的计算机,我想获取我用 winget 安装的所有软件包的列表,以便安装在新计算机上。这可能吗?
几年前,有一个名为PackageManagement(又名 OneGet)的 Microsoft 包管理器,它似乎基于 PowerShell 命令约定,并且是可扩展的。
最近,微软推出了另一个名为winget的包管理器工具,该工具仍被视为预发布版本。似乎没有使用 PowerShell 约定。
这两者之间是什么关系呢?
WinGet 是否会取代 OneGet,或者是否会存在某种互操作性?
exec.Command()
为执行而工作C:\Windows\System32\notepad.exe
exec.Command()
不适用于执行C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\winget.exe
. 失败并显示错误消息:
exec: "C:\\Users\\<username>\\AppData\\Local\\Microsoft\\WindowsApps\\winget.exe": file does not exist
os.StartProcess()
适用于执行C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\winget.exe
有人能告诉我为什么吗?
该代码片段不起作用。winget.exe
未启动。
wingetPath := filepath.Join(os.Getenv("LOCALAPPDATA"),
"Microsoft\\WindowsApps\\winget.exe")
cmd := exec.Command(wingetPath, "--version")
err := cmd.Start()
fmt.Println(err)
// exec: "C:\\Users\\<username>\\AppData\\Local\\Microsoft\\WindowsApps\\winget.exe": file does not exist
Run Code Online (Sandbox Code Playgroud)
但这有效:
wingetPath := filepath.Join(os.Getenv("LOCALAPPDATA"),
"Microsoft\\WindowsApps\\winget.exe")
procAttr := new(os.ProcAttr)
procAttr.Files = []*os.File{nil, nil, nil}
// The argv slice will become os.Args in the new process,
// so it normally starts with the program name
_, err := os.StartProcess(wingetPath, []string{wingetPath, …
Run Code Online (Sandbox Code Playgroud) winget list
命令显示我的计算机中当前安装的应用程序列表,但它不会像控制面板中那样按应用程序名称的字母顺序显示应用程序,
有没有办法使用应用程序名称的字母顺序显示已安装的应用程序winget
?
注意:这两个图像来自不同的机器。
谢谢。
我尝试为Framework版本4.7.2
和.NET 安装 .NET SDK 4.8
。但是,这似乎不可能,因为无法指定版本,甚至无法获取多个版本的搜索结果。(实际上 winget 包Microsoft.dotNetFramework
最终让我 v.. 4.8
)
我本希望能够通过以下方式找到这些:
winget search "SDK"
winget search "DotNet"
Run Code Online (Sandbox Code Playgroud)
但没有运气。
我还期望我可以使用这样的东西:
winget install --id Microsoft.WindowsSDK --version 4.7.2
winget install --id Microsoft.WindowsSDK --version 4.8
Run Code Online (Sandbox Code Playgroud)
但这没有任何结果,因为这些包没有任何Id
.
只有在手动安装和软件包之后,它们才会显示。ndp472-devpack-enu.exe
ndp48-devpack-enu.exe
$ winget.exe list --name "Microsoft .NET"
Name Id Version Source
------------------------------------------------------------------------------------------------------------
Microsoft .NET Framework 4.8 SDK {949C0535-171C-480F-9CF4-D25C9E60FE88} 4.8.03928
Microsoft .NET Framework 4.8 Targeting Pack {BAAF5851-0759-422D-A1E9-90061B597188} 4.8.03761
Microsoft .NET Framework 4.8 Targeting Pack …
Run Code Online (Sandbox Code Playgroud)