- Use the winget tool to install and manage applications
- Install winget
- Administrator considerations
- Use winget
- Commands
- Options
- Supported installer formats
- Scripting winget
- Missing tools
- Customize winget settings
- Open source details
- Как установить приложения из командной строки Windows
- Как я могу установить программы / приложения на Windows из командной строки?
- Как установить Scoop на Windows Server?
- Установите Scoop на Windows / Windows Server
- Включите мульи-загрузочное скачивание
- Как использовать Scoop в Windows / Windows Server
- Установить приложение со Scoop
- Поиск пакета со Scoop
- Удалить пакет с помощью Scoop
- Список установленных приложений со Scoop
- Обновление приложений, установленных со Scoop
- Удалить приложения старых версий
- Добавить комментарий Отменить ответ
- • Свежие записи
- • Категории
- • itsecforu.ru
- • Страны посетителей
- IT is good
- Команда install (winget) install command (winget)
- Использование Usage
- Аргументы Arguments
- Параметры Options
- Примеры запросов Example queries
- Множественный выбор Multiple selections
- Локальная установка Local install
- Файлы журнала Log files
Use the winget tool to install and manage applications
Windows Package Manager and the winget tool are in public preview and may be substantially modified before they are generally available. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The winget command line tool enables developers to discover, install, upgrade, remove and configure applications on Windows 10 computers. This tool is the client interface to the Windows Package Manager service.
The winget tool is currently a preview, so not all planned functionality is available at this time.
Install winget
There are several ways to install the winget tool:
The winget tool is included in the flight or preview version of Windows App Installer. You must install the preview version of App Installer to use winget. To gain early access, submit your request to the Windows Package Manager Insiders Program. Participating in the flight ring will guarantee you see the latest preview updates.
Install the Windows Desktop App Installer package located on the Releases page for the winget repository.
The winget tool requires Windows 10, version 1709 (10.0.16299), or a later version of Windows 10.
Administrator considerations
Installer behavior can be different depending on whether you are running winget with administrator privileges.
When running winget without administrator privileges, some applications may require elevation to install. When the installer runs, Windows will prompt you to elevate. If you choose not to elevate, the application will fail to install.
When running winget in an Administrator Command Prompt, you will not see elevation prompts if the application requires it. Always use caution when running your command prompt as an administrator, and only install applications you trust.
Use winget
After App Installer is installed, you can run winget by typing ‘winget’ from a Command Prompt.
One of the most common usage scenarios is to search for and install a favorite tool.
To search for a tool, type winget search .
After you have confirmed that the tool you want is available, you can install the tool by typing winget install . The winget tool will launch the installer and install the application on your PC.
In addition to install and search, winget provides a number of other commands that enable you to show details on applications, change sources, and validate packages. To get a complete list of commands, type: winget —help .
Commands
The current preview of the winget tool supports the following commands.
Command | Description |
---|---|
hash | Generates the SHA256 hash for the installer. |
help | Displays help for the winget tool commands. |
install | Installs the specified application. |
search | Searches for an application. |
show | Displays details for the specified application. |
source | Adds, removes, and updates the Windows Package Manager repositories accessed by the winget tool. |
validate | Validates a manifest file for submission to the Windows Package Manager repository. |
Options
The current preview of the winget tool supports the following options.
Option | Description |
---|---|
-v,—version | Returns the current version of winget. |
—info | Provides you with all detailed information on winget, including the links to the license and privacy statement. |
-?, —help | Shows additional help for winget. |
Supported installer formats
The current preview of the winget tool supports the following types of installers:
Scripting winget
You can author batch scripts and PowerShell scripts to install multiple applications.
When scripted, winget will launch the applications in the specified order. When an installer returns success or failure, winget will launch the next installer. If an installer launches another process, it is possible that it will return to winget prematurely. This will cause winget to install the next installer before the previous installer has completed.
Missing tools
If the community repository does not include your tool or application, please submit a package to our repository. By adding your favorite tool, it will be available to you and everyone else.
Customize winget settings
You can configure the winget command line experience by modifying the settings.json file. For more information, see https://aka.ms/winget-settings. Note that the settings are still in an experimental state and not yet finalized for the preview version of the tool.
Open source details
The winget tool is open source software available on GitHub in the repo https://github.com/microsoft/winget-cli/. The source for building the client is located in the src folder.
The source for winget is contained in a Visual Studio 2019 C++ solution. To build the solution correctly, install the latest Visual Studio with the C++ workload.
We encourage you to contribute to the winget source on GitHub. You must first agree to and sign the Microsoft CLA.
Как установить приложения из командной строки Windows
Как я могу установить программы / приложения на Windows из командной строки?
Как установить Scoop на Windows Server?
В этой статье я покажу вам, как вы можете использовать установщик командной строки Scoop для Windows для установки ваших любимых приложений с открытым исходным кодом, которыми вы часто пользуетесь в Linux.
С помощью установщика командной строки Scoop для Windows вам не нужно беспокоиться о странных и длинных установщиках в стиле мастера установки, всплывающих окнах с разрешениями и ручной установке зависимостей.
Все, что вы делаете, это ручная работа в командной строке со Scoop.
Установите Scoop на Windows / Windows Server
Scoop устанавливается в Windows с помощью PowerShell.
Войдите в систему как администратор и запустите PowerShell.
Когда PowerShell запущен, используйте следующую команду, чтобы установить scoop по умолчанию (C:\Users\ \scoop)
Установщик загрузит, распакует и установит Scoop.
Вы можете подтвердить, работает ли Scoop, просмотрев страницу справки с помощью Scoop.
Включите мульи-загрузочное скачивание
Scoop может использовать aria2 для загрузки нескольких подключений.
Установите aria2, используя Scoop, и он будет использоваться для всех последующих загрузок.
Как использовать Scoop в Windows / Windows Server
Вот команды scoop, доступные для использования:
Давайте рассмотрим несколько примеров.
Установить приложение со Scoop
Пример ниже установит менеджер загрузок aria2 в Windows, используя Scoop.
Установите несколько приложений, разделяя их пробелом.
Установленные приложения находятся в домашнем каталоге пользователя
Поиск пакета со Scoop
Поиск доступных пакетов с помощью опции поиска.
Моя любимая командаwhich: которая используется для определения пути двоичного исполняемого файла.
Я буду искать ее с помощью Scoop.
Исходя из вывода, мы можем подтвердить, какой инструмент доступен для установки. Используйте команду install, чтобы получить его.
Смотрите скриншот ниже.
Удалить пакет с помощью Scoop
Чтобы удалить приложение, используйте команду scoop uninstall.
Список установленных приложений со Scoop
Используйте команду list, чтобы получить список всех установленных приложений.
Обновление приложений, установленных со Scoop
Параметр команды update используется для обновления приложений или самого Scoop.
Сначала установите git.
Затем обновите установленные приложения / Scoop.
Установите значения конфигурации для приложения
Используйте опцию команды config. Например, установите aria2 повторять попытку 5 раз.
Чтобы отключить aria2, используйте
Удалить приложения старых версий
Параметр cleanup используется для очистки приложений путем удаления старых версий.
Изучите другие варианты, используя справку Scoop.
Добавить комментарий Отменить ответ
• Свежие записи
• Категории
• itsecforu.ru
• Страны посетителей
IT is good
Команда install (winget) install command (winget)
Сейчас предоставляется общедоступная предварительная версия Диспетчера пакетов Windows и средства winget. Перед выпуском общедоступной версии в решения могут быть внесены значительные изменения. Windows Package Manager and the winget tool are in public preview and may be substantially modified before they are generally available. Майкрософт не дает никаких гарантий, явных или подразумеваемых, в отношении предоставленной здесь информации. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Команда install программы winget устанавливает указанное приложение. The install command of the winget tool installs the specified application. Чтобы указать приложение, которое нужно установить, используйте команду search. Use the search command to identify the application you want to install.
Для команды install необходимо указать точную строку для установки. The install command requires that you specify the exact string to install. В случае какой-либо неоднозначности вам будет предложено дополнительно отфильтровать команду Install для уточнения приложения. If there is any ambiguity, you will be prompted to further filter the install command to an exact application.
Использование Usage
winget install [[-q] \ ] [\ ]
Аргументы Arguments
Доступные аргументы перечислены ниже. The following arguments are available.
Аргумент Argument | Описание Description |
---|---|
-q,—query -q,—query | Запрос, используемый для поиска приложения. The query used to search for an app. |
-?, —help -?, —help | Позволяет получит дополнительную справку по этой команде. Get additional help on this command. |
Параметры Options
Эти параметры позволяют настроить функцию установки в соответствии со своими потребностями. The options allow you to customize the install experience to meet your needs.
Параметр Option | Описание Description |
---|---|
-m, —manifest -m, —manifest | За этим параметром должен следовать путь к файлу манифеста (YAML). Must be followed by the path to the manifest (YAML) file. Манифест можно использовать для запуска функции установки из локального файла YAML. You can use the manifest to run the install experience from a local YAML file. |
—id —id | Ограничивает установку приложением с определенным идентификатором. Limits the install to the ID of the application. |
—name —name | Ограничивает поиск приложением с определенным именем. Limits the search to the name of the application. |
—moniker —moniker | Ограничивает поиск моникером, указанным для приложения. Limits the search to the moniker listed for the application. |
-v, —version -v, —version | Позволяет указать точную версию для установки. Enables you to specify an exact version to install. Если параметр не задан, будет установлено приложение с наибольшим номером версии. If not specified, latest will install the highest versioned application. |
-s, —source -s, —source | Ограничивает поиск источником с указанным именем. Restricts the search to the source name provided. За этим параметром должно следовать имя источника. Must be followed by the source name. |
-e, —exact -e, —exact | Ищет точное совпадение со строкой в запросе, выполняя при этом проверку на учет регистра. Uses the exact string in the query, including checking for case-sensitivity. Поведение по умолчанию для подстроки не используется. It will not use the default behavior of a substring. |
-i, —interactive -i, —interactive | Запускает установщик в интерактивном режиме. Runs the installer in interactive mode. При взаимодействии по умолчанию отображается ход выполнения установщика. The default experience shows installer progress. |
-h, —silent -h, —silent | Запускает установщик в автоматическом режиме. Runs the installer in silent mode. Блокирует весь пользовательский интерфейс. This suppresses all UI. При взаимодействии по умолчанию отображается ход выполнения установщика. The default experience shows installer progress. |
-o, —log -o, —log | Направляет данные журнала в файл журнала. Directs the logging to a log file. Необходимо указать путь к файлу, для которого у вас есть права на запись. You must provide a path to a file that you have the write rights to. |
—override —override | Строка, которая будет передана непосредственно в установщик. A string that will be passed directly to the installer. |
-l, —location -l, —location | Расположение для установки (если поддерживается). Location to install to (if supported). |
Примеры запросов Example queries
В следующем примере устанавливается определенная версия приложения. The following example installs a specific version of an application.
В следующем примере выполняется установка приложения по его идентификатору. The following example installs an application from its ID.
В следующем примере выполняется установка приложения по версии и идентификатору. The following example installs an application by version and ID.
Множественный выбор Multiple selections
Если по запросу, отправленному программе winget, найдено несколько приложений, winget отобразит результаты поиска. If the query provided to winget does not result in a single application, then winget will display the results of the search. Это даст вам дополнительные данные, необходимые для уточнения условий поиска и правильной установки. This will provide you with the additional data necessary to refine the search for a correct install.
Лучший способ ограничить выбор одним файлом — использовать идентификатор приложения в сочетании с параметром точного запроса. The best way to limit the selection to one file is to use the id of the application combined with the exact query option. Например: For example:
Локальная установка Local install
Параметр manifest позволяет установить приложение, передавая YAML-файл непосредственно клиенту. The manifest option enables you to install an application by passing in a YAML file directly to the client. Параметр manifest используется следующим образом. The manifest option has the following usage.
Использование: winget install —manifest \ Usage: winget install —manifest \
Параметр Option | Описание Description |
---|---|
-m, —manifest -m, —manifest | Путь к манифесту устанавливаемого приложения. The path to the manifest of the application to install. |
Файлы журнала Log files
Если файлы журналов для winget не перенаправлены, они будут находиться в следующей папке: %temp%\AICLI\*.log. The log files for winget unless redirected, will be located in the following folder: %temp%\AICLI\*.log