-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Support additional arguments as well as overridden arguments #239
Comments
I would like to see custom install arguments for each app when I do:
I would also like a guided installation where the installer UI shows up and I can personally select options and manually hit next, next, next, finish.
|
I found an opportunity to specify additional attributes in the manifest and in the source code, but this is not fully implemented. |
@RehanSaeed
|
This is not what he is asking for. We need a hidden installation, but with the ability to specify parameters. The existing parameters in the manifest must be saved so that the user does not rewrite them. At the moment, none of the moderators and developers have been able to fully explain how the "Custom" switch works. The description of this key explicitly states that it is used for additional parameters. It is not logical if it is automatically added to the required parameters. Either this key is not fully implemented, or there is a bug with its work and lack of description. |
Examples (not real data). Help (not real data) |
@iDolmatov "Custom" switches are passed to the installer regardless of whether it is executed with "Silent", "SilentWithProgress", or "Interactive". The "Custom" switches are optional, and not required. The only time "Silent" and "SilentWithProgress" are required is when you have an .exe installer (not Nullsoft, Inno, or another known "InstallerType") to support those installation modes in the client. |
https://github.com/microsoft/winget-pkgs/tree/master/manifests/a/AIMP/AIMP What's wrong? Bug? Try use: Edit: Shortcut comment needless info. |
The "Custom" flags are passed to the installer in addition to the "Silent" or "SilentWithProgress" or "Interactive" depending on what install mode was selected. For a "Silent" install, the installer would receive |
Thank you. Insufficient description of the parameter and its name misled me. Thought it meant another installation mode. It turns out that this is a kind of "ForcedSwitch". Please indicate which is always used: https://github.com/microsoft/winget-cli/blob/master/schemas/JSON/manifests/v1.0.0/manifest.installer.1.0.0.json |
I'm working on another set of documents designed to explain all of the fields fully. I'm also writing more thorough guidance on authoring manifests. The current document is a stub so I can start doing some refactoring on other documents. More to come 😊 |
@gmckeown we added support for "user" vs. "machine" install. Manifests can have both flavors. We still don't have an additive argument for passing arguments in addition rather than an override, so I'll keep this issue open. |
@denelon - See above linked PR |
All, @Trenly implemented "--custom". If you pass "--custom" and arguments, they will be added to the existing arguments provided by WinGet and the manifest. Note: if you use "--override", the "--custom" arguments are ignored. |
Description of the new feature/enhancement
Some installers, for example WinSCP, pop up a dialog asking whether I wish to install for current user or all users (note: #149 might be relevant for this specific case).
WinSCP supports the /ALLUSERS and /CURRENTUSER options to cater for this; however, if I use
--override
it clears all options specified in the manifest and replaces them. So the following ends up performing an interactive install:winget install --override "/ALLUSERS" winscp
So I locate the manifest, identify that it has the /VERYSILENT option and change my command to:
winget install --override "/VERYSILENT /ALLUSERS" winscp
This achieves what I want -- a completely silent install with my chosen option.
Proposed technical implementation details (optional)
A new switch that adds the listed arguments to the installer command-line rather than replaces them. This would supplement the
--override
option rather than replacing it.Something along the lines of the following would then allow me to retain the manifest-specified default options, whilst still including my choices:
winget install --pass-args "/ALLUSERS" winscp
They key benefit here is that if the authors of the manifest add new default options, I don't have to manually modify my install command to match.
The text was updated successfully, but these errors were encountered: