9

我正在尝试为我们的计算机远程安装 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 query used to search for a package

The following options are available:
  -m,--manifest                The path to the manifest of the package
  --id                         Filter results by id
  --name                       Filter results by name
  --moniker                    Filter results by moniker
  -v,--version                 Use the specified version; default is the latest version
  -s,--source                  Find package using the specified source
  --scope                      Select install scope (user or machine)
  -e,--exact                   Find package using exact match
  -i,--interactive             Request interactive installation; user input may be needed
  -h,--silent                  Request silent installation
  --locale                     Locale to use (BCP47 format)
  -o,--log                     Log location (if supported)
  --override                   Override arguments to be passed on to the installer
  -l,--location                Location to install to (if supported)
  --force                      Override the installer hash check
  --accept-package-agreements  Accept all license agreements for packages
  --header                     Optional Windows-Package-Manager REST source HTTP header
  --accept-source-agreements   Accept all source agreements during source operations

More help can be found at: https://aka.ms/winget-command-install

我尝试了不同的选项,winget install --help比如 --silent、--interactive 或 --override,但无济于事。

我可以直接进入 Microsoft Store 进行安装,它会询问我是否要登录或使用“不,谢谢”进行安装,然后就可以了,但这不是我打算做的,我不打算这样做不想去每台机器上做这件事。我可能会尝试从这里https://serverfault.com/questions/1018220/how-do-i-install-an-app-from-windows-store-using-powershell通过 Powershell 安装的另一种方法,但这又是,不是我想要的。

对此的任何帮助将不胜感激。

4

2 回答 2

5

打开 MS Store 和设置。将购买登录切换为打开。

于 2021-10-15T18:48:56.037 回答
2

尚不支持此功能(截至 2022 年 1 月)。GitHub 上有一个未解决的问题:https ://github.com/microsoft/winget-cli/issues/1585

于 2022-01-24T20:16:07.050 回答