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

Add support for --override #4

Closed
DeusMaximus opened this issue Mar 21, 2022 · 4 comments · Fixed by #19
Closed

Add support for --override #4

DeusMaximus opened this issue Mar 21, 2022 · 4 comments · Fixed by #19
Labels
enhancement New feature or request

Comments

@DeusMaximus
Copy link
Contributor

We currently use Winget to install our antimalware software and use the override flag to specify the appropriate license key, as per the following example.

winget install --id=Webroot.SecureAnywhere -e -h --override "/silent /key=XXXX-XXXX-XXXX-XXXX-XXXX /exeshowaddremove /lang=en"

It'd be nice to be able to support the override flag in this script for cases like this, where commercial software requiring product keys or other cases rely on the override flag.

@Romanitho
Copy link
Owner

Romanitho commented Mar 21, 2022

Maybe it can work with something like this :
.\winget-install.ps1 -AppIDs 'Webroot.SecureAnywhere --override "/silent /key=XXXX-XXXX-XXXX-XXXX-XXXX /exeshowaddremove /lang=en"'
haven't tried yet :)

Edit:
Of course, it doesn't pass the check of package 😅

@Romanitho
Copy link
Owner

We will have to think differently cause we can put several packages in the script. So not easy to introduce the override feature as is.

@DeusMaximus
Copy link
Contributor Author

It may have to be an additional parameter, accepting the commands you want to override with as input.

There'd also have to be a check whether the override flag is used or not before adding the flag to the actual winget command being run, otherwise it'll see override with nothing next to it, and ignore the usual silent installation options.

When I have a moment, I'll throw together a proof of concept. I have a rough idea how to do it in my head, just have to find time to make it work.

@Romanitho
Copy link
Owner

#20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants