microsoft / microsoft/winget-cli
Allow for optional custom installer switches
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Description of the new feature / enhancement
In the manifest schema, there is a field for custom installer switches, which are always applied. However, packages may support other custom switches that users may want to use without having to use the override parameter. If there was an ability to add these as optional switches and to show them in winget show, it could make for a better overall experience
Proposed technical implementation details
Thought 1 - Change InstallerSwitches > Custom to an array type of CustomSwitch objects
InstallerSwitches:
Silent: "/quiet"
Custom:
- Switch: NoRestart
Value: "/suppressReboot"
Default: true
- Switch: NoDesktopIcon
Value: "/desktopicon=0"
Default: false
User would run winget install example.package --silent --NoDesktopIcon and the package would be installed using example.package.exe /quiet /suppressReboot /desktopicon=0
Thought 2 - entirely new manifest field
InstallerSwitches:
Optional:
NoDesktopIcon: "/desktopicon=0"
UseAppdataFolder: "/appdata=1"
User could run winget install example.package --UseAppdataFolder
Edit: Thought 3 - Allow for them to be under Installer Switches
InstallerSwitches:
Silent: “/quiet”
Custom: “/norestart”
NoDesktopIcon: "/desktopicon=0"
UseAppdataFolder: "/appdata=1"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the manifest schema handling and the code paths for winget install and winget show, since no specific files or tests are named. Compare the three proposed representations and trace how custom switches are parsed, displayed, and passed to installers. Done means an agreed optional-switch design is supported in manifests, shown by winget show, and accepted by installation commands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100