microsoft / microsoft/winget-pkgs
[Package Issue]: Microsoft.VisualStudio.2022.BuildTools -- '--silent --disable-interactivity' do not work with install or remove
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 11.1k
- Forks
- 9.7k
- Avg merge
- 1h 32m
- Merged PRs (30d)
- 376
Description
Please confirm these before moving forward
- I have searched for my issue and not found a work-in-progress/duplicate/resolved issue.
- I have not been informed if the issue is resolved in a preview version of the winget client.
Category of the issue
Installation issue.
Brief description of your issue
winget install Microsoft.VisualStudio.2022.BuildTools --silent --disable-interactivity doesn't install the package without a human clicking on various popups.
Steps to reproduce
Run winget install Microsoft.VisualStudio.2022.BuildTools --silent --disable-interactivity
Actual behavior
Using
winget install Microsoft.VisualStudio.2022.BuildTools --silent --disable-interactivity to install the package, the user is presented
- UAC prompt
- A Visual Studio installer "Continue" prompt
- Must close the installer window that comes up after it finishes running.
Expected behavior
Using
winget install Microsoft.VisualStudio.2022.BuildTools --silent --disable-interactivity --override "--passive"
skips items 2 and 3 unless there is a visual studio installer update, which the flag --noUpdateInstaller is supposed to inhibit, but then the package installation fails, so I guess passing that flag is not viable.
It's not clear to me that winget can ever suppress the UAC prompt, though it sure would be nice.
When removing, the --override flag cannot be passed, so the only flags available for non-interactive removal are --silent --disable-interactivity. The installer opens in interactive mode and requires the user to press OK to uninstall, and then close the installer when finished.
Notably, if --override is used on install to pass the --installPath flag, then remove will probably be unable to remove the package because it won't know which installation path to remove.
Environment
winget --info
Windows Package Manager v1.6.2771
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.19045.3570
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.21.2771.0
Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User) %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root C:\Program Files\WinGet\Packages
Portable Package Root (x86) C:\Program Files (x86)\WinGet\Packages
Installer Downloads %USERPROFILE%\Downloads
Links
---------------------------------------------------------------------------
Privacy Statement https://aka.ms/winget-privacy
License Agreement https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale
Admin Setting State
--------------------------------------------------
LocalManifestFiles Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride Disabled
LocalArchiveMalwareScanOverride Disabled
Screenshots and Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the documented winget install and remove commands for Microsoft.VisualStudio.2022.BuildTools on the stated Windows and Windows Package Manager versions. Compare the observed prompts with the expected non-interactive behavior and determine whether the package manifest or winget client owns the change; done means installation and removal no longer require the reported interactions.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100