This may be more of a question but if you "winget install vscode" do you get no opportunity to configure it like a traditional installer wizard? how do you guys determine what the defaults would be? Things like do I want "Open in Code" to appear in the Windows Context Menu. Or is the philosophy that you would first install a software and then configure it post installation?
Thanks
I would like to see custom install arguments for each app when I do:
> winget install Microsoft.VisualStudio --help
> --python - Installs python
> --Node - Installs Node
> etc....
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.
> winget install Microsoft.VisualStudio --guided
This has been frustrating to stumble upon. Do you know how to configure VS Code after the fact?
I might just have to uninstall and re-install from the website 馃槥
Winget CLI has two additional command line options for these use cases:
|Option|Description|
|---|---|
|-i, --interactive | Runs the installer in interactive mode.聽The default experience shows installer progress.|
|--override | A string that will be passed directly to the installer.|
Source: https://docs.microsoft.com/en-us/windows/package-manager/winget/install#options
However, the --interactive option does not seem to work properly at the moment. The parameters specified via --override completely replace the original installer parameters from the manifest which should allow you to run the installer with parameters you want.
Thanks @megamorf! The part I don't understand is why the default behavior is different. It's not intuitive. So far the 2 times I've tried to install an app with winget, I haven't had any success.
How do I discover what string to pass to the installer via the --override switch?
The problem is that there are countless installer formats, e.g. InstallShield, Wise InstallMaster, Inno Setup, Nullsoft Scriptable Install System, Ghost Installer, msix, appx, custom exe files, etc. All have varying command line parameters (some even lack command line parameter support). Some setups have additional custom parameters. All of those are hard to discover so there's no way for winget to be able to list them on the fly.
So, I have to know how to run the installer? Which presumably I would have to download the installer or visit a website to understand, at which point I'll just download from there. I get that maybe once I know it, I could script the install with winget, which could be useful.
What about my original question about why the winget install of VS Code doesn't have the same UI as the regular VS Code install? Why do I need to pass the --interactive switch to get normal behavior?
So, I have to know how to run the installer? Which presumably I would have to download the installer or visit a website to understand, at which point I'll just download from there. I get that maybe once I know it, I could script the install with winget, which could be useful.
Correct, that's the way you'd do it.
What about my original question about why the winget install of VS Code doesn't have the same UI as the regular VS Code install? Why do I need to pass the --interactive switch to get normal behavior?
Winget is a package manager. Package managers install packages silently (unattended) which means they'll pass a set of default parameters to the package's installer. That's why you'll only see a progress bar or nothing at all. Having package managers run installers interactively is not a typical use case.
Having package managers run installers interactively is not a typical use case.
Right, but from my experience I've also never installed something through a package manager, found that the installation doesn't meet my needs, uninstall it, and re-install it from the website. I totally get that the amount of installers that exists and the fact that we're playing catch-up makes this a difficult problem to solve. But I don't think "this is as good as it can get" is a suitable response. Surely there must be something apps can do so that they have the proper install experience on winget regardless of installer?
It's probably a long road ahead and not sure if Microsoft wishes to head to this in the future, but in my ideal world winget would work similar to installing packages on Linux. That means that in a way there's no need for "installers".
However that means the software prolly needs to be bundled differently and unified via the winget way, so I think that's why winget currently relies on external installers (but hopefully this changes in the future).
For now that means using --interactive flag for git and vim, since I disagree with the default options of not making the commands available in Powershell and Command Line.
@nbarkhina the -i "interactive" install has been fixed for a few releases. Does that satisfy your request here?
very cool i will give that a try thanks!
Most helpful comment
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.