Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings for installer modes #910

Open
denelon opened this issue Apr 30, 2021 · 5 comments
Open

Settings for installer modes #910

denelon opened this issue Apr 30, 2021 · 5 comments
Labels
Area-Settings Issue related to WinGet Settings Issue-Feature This is a feature request for the Windows Package Manager client.

Comments

@denelon
Copy link
Contributor

denelon commented Apr 30, 2021

Description of the new feature/enhancement

Users should be able to specify a requirement or a preference for install modes in their settings.

Some installers do not support "silent" or unattended install. This can have a negative impact on scripted installs or import. Some users may wish to have "interactive" as their preferred installation mode.

Proposed technical implementation details (optional)

If a user requires "silent" as their install mode, search should not show results for installers that do not support "silent" install.
if a user attempts to install a package, and their install mode requirement cannot be respected, the user should be informed.
If a user attempts to import a set of packages, their install mode preferences should be respected.
If a user attempts to import a set of packages, and their install mode requirement cannot be respected, the user should be informed.

Note: This feature is a prerequisite to allowing packages with only interactive install mode to the community repository.

@JustMyGithub
Copy link

Can winget handle command switches for installers already? Most silent setups I know are not silent themselves, but require cli parameters like "setup.exe --silent" and I have not read winget being able to handle that yet.

@denelon
Copy link
Contributor Author

denelon commented Jun 1, 2021

@JustMyGithub yes. If the installer is MSIX, MSI, or an installer type we recognize like Nullsoft, Inno, etc. the client knows what switches to pass, so they are not needed in the manifest. If it is a custom .exe installer you would pass the switches to the installer via the manifest in the "InstallerSwitches" key.

"InstallerSwitches": {
      "type": "object",
      "properties": {
        "Silent": {
          "type": [ "string", "null" ],
          "minLength": 1,
          "maxLength": 512,
          "description": "Silent is the value that should be passed to the installer when user chooses a silent or quiet install"        },

@JustMyGithub
Copy link

So some tools show the setup wizard when installed with Winget and other dont? Thats a pretty unintuitive user experience.

Is "null" in your example the place where the cli parameters would be configured? (like 'type": [ "string", "--silent" ]') ?

@denelon
Copy link
Contributor Author

denelon commented Jun 2, 2021

No, that code snippet is from the JSON schema designed to aid building a manifest in an IDE like Visual Studio Code with JSON schema validation support. The node is nullable, but our "business logic" for the community repository requires the Silent and SilentWithProgress switches for some .exe installers.

If you were to host a private repository, or use a local manifest from your file system, the InstallerSwitches node is not required.

@hansmbakker
Copy link

hansmbakker commented Jul 30, 2022

I added the requirement for interactive installation in my manifest PR but

winget install --manifest .\manifests\a\Audient\Sono\4.2.1.0\

does not trigger an interactive installation and instead fails with exit code 2 - is that related to this issue?

The executable seems not to respond to command line parameters so I do not know how to make it unattended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issue related to WinGet Settings Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

No branches or pull requests

3 participants