microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.28k stars 1.45k forks source link

Trying to update software using `winget upgrade --all` #4972

Open ArtistYay opened 2 hours ago

ArtistYay commented 2 hours ago

Brief description of your issue

Running the command winget upgrade --all and I'm getting an error of An unexpected error occurred while executing the command: Bad optional access.

Image

Things I've tried:

  1. winget source reset --force; winget source update Image

  2. Manually Add winget.exe to PATH. I saw that I didn't have winget in my environment variable path so I added it with the C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_8.1.19411.0_x64__8wekyb3d8bbwe directory.

  3. I Tried to uninstall and reinstall the App installer but got a grey box.Image

  4. Not sure if this will help but can't find the executable in file explorer. Image

  5. Lastly, I tried renaming the pinning database but nothing like that is found in my file explorer. Image

System Specs:

winget --version v1.9.25180

Edition: Windows 11 Home Version: 23H2 OS build: 22631.4460 Experience: Windows Feature Experience Pack 1000.22700.1047.0

Here is my logs -> WinGet-2024-11-15-08-26-37.950.log

I also seen issue #4909 but don't think the issue was resloved.

Steps to reproduce

Run the winget upgrade --all command

Expected behavior

To upgrade the packages.

Actual behavior

Not upgrading the packages.

Environment

`winget --info
Windows Package Manager v1.9.25180
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.4460
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.24.25180.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`
similar-issues-ai[bot] commented 2 hours ago

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.