microsoft / microsoft/winget-cli

Allow for optional custom installer switches

Open
#1,783 10 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Manifest Issue-Feature
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.