-
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
[Feature proposal] Conditional parameters #1089
Comments
|
This command just execute "uninstaller", like you remove program from "Control panel". And there is no way to define parameters in manifest file. |
@gvvad I think we have a path for the install scenario lined up. The manifest supports switches per install mode, and they are combined with the "custom" switches. These essentially ensure the installer is functioning for the default install modes. With #239 users can extend the existing set of switches, and with "override" users can replace all of the switches with what ever they choose to pass to the installer. The uninstall and upgrade scenario you are suggesting makes sense to me. We could add an "Uninstall" and "Upgrade" node for switches to be passed to the installer by default as specified in a manifest, and we could support an override switch for that use case as well with the same behavior as the install scenario. The problem with defining a list of parameters is that there is no single set of "standard" switches that apply to MSIX, MSI, Inno, NullSoft, Wix, Burn, Squirrel, or custom .exe installers. I believe we would be trying to build a list of "sentinel" values, and that would be overly complex to maintain over time. |
Yes, this is the key problem. And I suggest defining a list of the most common flags such as "isSilent", "isRun", "isRestart", "isIcon" etc. And "maintainer" will be able to define them by using special syntax, like: |
@gvvad we've identified this Issue as a duplicate of another one that already exists. This specific instance is being closed in favor of tracking the concern over on the referenced Issue. Thanks for your report! Be sure to add your 👍 to the other issue to help raise the priority. |
Description:
Instead of a system of different scenarios (Silent, SilentWithProgress, Interactive...), provide "conditional parameters" which will be added by condition. Some conditions(flags) will be true by default, such as "silent install". But the user can override them, turn them on / off at their own discretion.
This is not a replacement for the existing system, but rather an improvement. Also will be good to add "uninstall" scenario.
Proposed technical implementation details:
Provide parameters in manifest:
Installers:
...
InstallParam: $isSilent{$isVerysilent{/VERYSILENT:/SILENT}} $isUser{/CURRENTUSER:/ALLUSERS} $isIcon{:/NOICONS}
UpgradeParam: $isNorestart{/NORESTART} $isLog{$isLogfile{/LOG={logfile}:/LOG}}
...
Provide parameters to winget:
winget install foo --noicon
winget install foo --alluser --noicon --verysilent
winget upgrade foo --log
winget upgrade foo --log="c:\path\to\logfile.txt"
The text was updated successfully, but these errors were encountered: