iTranslated by AI
Released posh-winget: A package management module for winget supporting installer options
Introduction
The long-awaited official Windows package manager, "winget," has been released, and I think it's now in a state where it's ready for practical use.
While some applications are not yet published on winget, many applications are already available for use.
However, I personally have one major frustration.
That is, the import command for bulk installation does not support specifying installer options. (This is clear when looking at the import file's JSON schema.)
Since it is supported in the winget install command, I expect it will be supported eventually, but for certain reasons, I couldn't wait! So, I made my own.
This is a helper module until official support is provided.
Installation
I created posh-winget as a PowerShell module, so you can install it from the gallery by running the following command in PowerShell:
Install-Module posh-winget
Configuration File
For example, create a YAML file named something like winget.yml and describe the settings as follows:
- id: Git.Git
- id: Microsoft.VisualStudioCode
packageParameters: >-
/VERYSILENT
/NORESTART
/MERGETASKS=!runcode,addcontextmenufiles,addcontextmenufolders,associatewithfiles,addtopath
You can specify installer options in packageParameters.
Please research the installer for each application to find out what options are available.
Bulk Installation
Run the following command using the configuration file you created.
Invoke-WingetImport winget.yml
Conclusion
I hope that official support will be added soon and that a world where this is no longer necessary arrives quickly.
Discussion