Skip to content

Trying to update software using winget upgrade --all: bad optional access #4972

Open
@ArtistYay

Description

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`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Command-UpgradeIssue related to WinGet UpgradeIssue-BugIt either shouldn't be doing this or needs an investigation.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions