microsoft / microsoft/winget-cli
Add support for local accounts for winget without login into store, update winget with Windows Update
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
I was testing my setup on fresh installation of windows with local account and found out that winget is not working.
A. disable-interactivity is not recognized
install -e --id 7zip.7zip --disable-interactivity --accept-source-agreements --accept-package-agreements
--accept-package-agreements
and this argument seems like is not recognized.
B. *List command returns *
PS C:\Users\я> winget list
\
Steps to reproduce
A. Command line
install -e --id 7zip.7zip --disable-interactivity --accept-source-agreements --accept-package-agreements
B. Command line
winget list
Expected behavior
A. Argument is recognized.
B. List of installed apps is returned.
Actual behavior
A. Error encountered parsing command line. Disable-interactivity argument not recognized.
B. Output is "/"
Environment
Windows: Windows.Desktop v10.0.22621.2428
Microsoft.DesktopAppInstaller v1.17.10691.0
A. Logs
**install -e --id 7zip.7zip --disable-interactivity --accept-source-agreements --accept-package-agreements**
disable-interactivity
2023-10-21 14:03:12.144 [CORE] WinGet, version [1.2.10691], activity [{14E01F31-3A73-467A-8C24-12A2DA0C8603}]
2023-10-21 14:03:12.145 [CORE] OS: Windows.Desktop v10.0.22621.2428
2023-10-21 14:03:12.145 [CORE] Command line Args: "winget" install -e --id 7zip.7zip --disable-interactivity --accept-source-agreements --accept-package-agreements
2023-10-21 14:03:12.145 [CORE] Package: Microsoft.DesktopAppInstaller v1.17.10691.0
2023-10-21 14:03:12.145 [CORE] IsCOMCall:0; Caller: winget-cli
2023-10-21 14:03:12.155 [CLI ] WinGet invoked with arguments: 'install' '-e' '--id' '7zip.7zip' '--disable-interactivity' '--accept-source-agreements' '--accept-package-agreements'
2023-10-21 14:03:12.156 [CLI ] Found subcommand: install
2023-10-21 14:03:12.156 [CLI ] Leaf command to execute: root:install
2023-10-21 14:03:12.177 [CLI ] Error encountered parsing command line: Имя аргумента не распознано для текущей команды
B. Logs for winget list
2023-10-21 14:23:05.226 [CORE] WinGet, version [1.2.10691], activity [{EBECC0EE-3FB1-451A-9CB2-08444E719749}]
2023-10-21 14:23:05.226 [CORE] OS: Windows.Desktop v10.0.22621.2428
2023-10-21 14:23:05.226 [CORE] Command line Args: "C:\Users\я\AppData\Local\Microsoft\WindowsApps\winget.exe" list --source winget
2023-10-21 14:23:05.226 [CORE] Package: Microsoft.DesktopAppInstaller v1.17.10691.0
2023-10-21 14:23:05.226 [CORE] IsCOMCall:0; Caller: winget-cli
2023-10-21 14:23:05.229 [CLI ] WinGet invoked with arguments: 'list' '--source' 'winget'
2023-10-21 14:23:05.229 [CLI ] Found subcommand: list
2023-10-21 14:23:05.230 [CLI ] Leaf command to execute: root:list
2023-10-21 14:23:05.230 [CLI ] Executing command: list
2023-10-21 14:23:05.238 [REPO] Named source requested, found: winget
2023-10-21 14:23:05.239 [REPO] Source past auto update time [5 mins]; it has been at least 28298123 mins
I guess I found out the reason why win-get has obsolete version 1.2 with all updates of Windows 11 local installation. And therefore not working and has no support of --disable-interactivity. It's because somewhy Windows installer image contains obsolete version of win-get (1.2) and update of it its not part of windows update. Its part of windows store updates.
That's why I see 2 issues here
- setups cannot rely on win-get presence in the system, because it may be very outdated.
Fix can be
a) to put winget into windows updates. Or make Store to update system applications like win-get automatically without login to the store. Win-get is system wide utility, not user specific. Making it dependant on Store presence means it cannot be used for all other places by setup scripts to install missing dependencies. Missing dependencies have to be incorporated inside setup because of that.
b) to update winget version with newer Windows MSDN ISO image, not leave 1.2 version for some reason which is not working.
- winget will not work without Microsoft Store account on fresh installs.
It makes winget useless for setups, automation scripts
Fix can be
a) rethink vision of a tool. Make this vision is to perform automated installs.
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 both commands on a fresh Windows installation using a local account, recording the installed WinGet version and the command-line errors. Then trace how the listed version is provisioned and updated, and how local-account operation is handled. Done means the requested commands work without a Microsoft Store login and the update path is defined for fresh installations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100