关于winget是否默认采用程序安装器预设选项及隐私安全问题的解决方法问询
Hey there, let's break this down clearly based on what you've experienced and how winget actually works under the hood.
First off, your observation is spot-on: by default, winget does rely on the default installation parameters set by the software publisher. That means it uses the same pre-selected options you'd see if you ran the official installer manually—things like desktop shortcuts, telemetry enablement, or even bundled extra software (though most reputable packages on winget avoid the latter). Your Krita upgrade example is exactly this in action: winget launched the official installer with its default flags, which included adding that desktop shortcut you didn't want. The UAC prompt is also expected—most software installs require admin privileges, and winget doesn't bypass that for security reasons.
Now, for the solutions you're looking for to regain control over these privacy and user-hostile defaults:
Use custom installation arguments
This is the most reliable way to override default settings. Most installers (especially MSI packages or EXEs built with tools like Inno Setup) support command-line flags to tweak options. For example, if Krita's installer uses Inno Setup, you could use flags like/verysilent /desktopicon=0to skip the desktop shortcut. To apply this with winget, use the--overrideparameter:winget upgrade KDE.Krita --override "/verysilent /desktopicon=0"You'll need to look up the specific flags for each software's installer—usually, you can find this info on the publisher's support site or by running the installer with
/helpor--help.Check the winget package metadata
Some package maintainers have already configured more user-friendly defaults in the winget package definition. Runwinget show KDE.Kritato view details about the package—sometimes you'll find notes about recommended installation arguments or pre-configured flags that avoid unwanted options.Leverage winget's silent mode flags
While this doesn't override specific options, using--silentwill run the installer in quiet mode (if supported), which skips interactive prompts. Combine it with--accept-package-agreementsto auto-accept license terms and reduce manual intervention:winget upgrade KDE.Krita --silent --accept-package-agreementsJust note that this still uses the publisher's default settings—you'll need custom flags if you want to disable specific features.
Consider alternative package managers (with caution)
Tools like Scoop or Chocolatey sometimes repackage software to remove unwanted default options (like telemetry or bundled extras). However, keep in mind that these are third-party packages, not official releases from the software publisher—this introduces a small security risk, so only use trusted sources if you go this route.
I totally get why this feels frustrating—having control over your system's privacy and setup is critical. Winget's core design prioritizes using unmodified, official installers (which is great for security, as you're getting exactly what the publisher intends), but that means you have to take extra steps to override those default user-hostile options.
备注:内容来源于stack exchange,提问作者Capone

