Comments (8)
The --custom WinGet switch will only override the custom switch.
Actually, it doesn't! --custom
will only append the value
- microsoft/winget-cli#2832
- https://github.com/microsoft/winget-cli/blob/2979fd81dedd79f06bb0061159f6764b4ac70a9a/src/AppInstallerCLICore/Workflows/ShellExecuteInstallerHandler.cpp#L129-L144
2024-05-17 10:07:01.168 [CLI ] WinGet invoked with arguments: 'install' '-m' 'C:\Users\WDAGUtilityAccount\Desktop\SandboxTest\3.12.3' '--verbose-logs' '--ignore-local-archive-malware-scan' '--dependency-source' 'winget' '--custom' '/quiet'
|
| Truncated for readability
|
2024-05-17 10:07:04.732 [CLI ] Starting: 'C:\Users\WDAGUtilityAccount\AppData\Local\Temp\WinGet\Python.Python.3.12.3.12.3\python-3.12.3-amd64.exe' with arguments '/passive /norestart /log "C:\Users\WDAGUtilityAccount\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir\WinGet-Python.Python.3.12.3.12.3-2024-05-17-10-07-04.731.log" InstallAllUsers=0 PrependPath=1 /quiet'
from winget-pkgs.
The scope is controlled by the InstallAllUsers
switch from the installer, which would be overrode by your own installer switches by using the --override
switch from WinGet.
It is recommended to use the --silent
switch from WinGet for silent (without progress) installation.
from winget-pkgs.
\quiet
was just for a minimum reproducible example. The full command is as follows:
/quiet AssociateFiles=0 CompileAll=0 PrependPath=1 Shortcuts=1 Include_doc=0 Include_debug=0 Include_dev=0 Include_exe=0 Include_launcher=0 Include_lib=1 Include_pip=1 Include_symbols=0 Include_tcltk=0 Include_test=0 Include_tools=0'
--silent
alone simply isn't enough. What is the reason it is recommended?
Also, am I understanding correctly that simply using the --override
switch negates the --scope
switch entirely, even though I am not using any overrides that conflict with scope?
from winget-pkgs.
Sorry, I thought you were looking for a way to install it silently.
Take the x86 installer as an example. The --scope
switch chooses which entry to use between the following two entries, the user
one and the machine
one:
If one would like to install it in machine scope by specifying
--scope machine
, WinGet will choose the second one and apply the installer switches described in this entry, including the one InstallAllUsers=1
which asks the installer to install machine-wide. And if the --override
WinGet switch is used, all these installer switches will be discarded.from winget-pkgs.
No I should be sorry, I wasn't clear in explaining my intent in the initial example.
Thanks very much for the explanation, this makes much more sense now. Is there a technical reason winget discards Custom
switches when --overrides
is used? Can't they be appended? At the very least, a dialog before proceeding with the install informing the user that the --scope machine
part of the install command will be discarded would be helpful.
from winget-pkgs.
No I should be sorry, I wasn't clear in explaining my intent in the initial example.
Thanks very much for the explanation, this makes much more sense now. Is there a technical reason winget discards
Custom
switches when--overrides
is used? Can't they be appended? At the very least, a dialog before proceeding with the install informing the user that the--scope machine
part of the install command will be discarded would be helpful.
It not only discards the Custom
switch, but also all other switches, including the InstallLocation
switch above, the pre-defined Silent
switch (/quiet /norestart
in this case), the pre-defined SilentWithProgress
switch (/passive /norestart
) and the pre-defined Log
switch (/log "<LOGPATH>"
). All of them will be overrode by --override
.
The --custom
WinGet switch will only override the custom switch. Since this switch has already been used for forcing the scope for the installer and will be overrode by --custom
, you need to manually include InstallAllUsers=1
in your switches.
So the final command line would be like
winget install --id Python.Python.3.11 --scope machine --silent --custom 'InstallAllUsers=1 AssociateFiles=0 CompileAll=0 PrependPath=1 Shortcuts=1 Include_doc=0 Include_debug=0 Include_dev=0 Include_exe=0 Include_launcher=0 Include_lib=1 Include_pip=1 Include_symbols=0 Include_tcltk=0 Include_test=0 Include_tools=0'
from winget-pkgs.
@github-account1111 - try using --custom
instead of --override
to add parameters to the install without erasing any of the ones defined in the manifest
from winget-pkgs.
Hello @github-account1111,
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any recent activity. It will be closed if no further activity occurs within 3 days of this comment.
Template: msftbot/noRecentActivity
from winget-pkgs.
Related Issues (20)
- [Update Request]: Telegram Desktop HOT 1
- [Update Request]: Unified Remote
- [Update Request]: OpensJS.NodeJS HOT 3
- PGAdmin update to 8.7 [Update Request]:
- [Package Issue]: VirusTotal.VirusTotalUploader HOT 2
- [Package Request]: MessyFileOrganizer
- [Package Request]: Synergy HOT 2
- [Update Request]: Stunt Rally
- [Update Request]: Azure CLI `Microsoft.AzureCLI` - Add x64 ZIP portable version too
- [Update Request]: The Dude
- [Package Request]: custom teamviewer 11 HOT 5
- GeoGebra.Classic not updated from 6.0.838.0 to 6.0.843 error 1638 HOT 2
- [New Feature]: Add security related metadata on manifest files.
- [Package Request]: BetterDiscord HOT 2
- [Package Issue]: Azul.ZuluFX HOT 2
- [Update Request]: Update TheDocumentFoundation.LibreOffice HOT 1
- [Update Request]: Update QVR Pro Client to 2.6.0.0873
- [Package Request]: opsiclientd update HOT 6
- [Package Issue]: ShiningLight.OpenSSL is attempting to pull very large installer files
- [Package Request]: night-light
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from winget-pkgs.