winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

Failing to update Microsoft.VCRedist.2013 (x86 and x64)

Open jmtn opened this issue 1 year ago • 5 comments

Relevant area(s)

WinGet CLI

Relevant command(s)

winget upgrade

Brief description of your issue

Hello,

I have 2 outdated versions of VC++2013 installed, which WinGet correctly detects:

Image

They were installed as a dependency, probably by a game or something.

However attempting to upgrade both results in the following errors:

C:\Windows\system32>winget upgrade Microsoft.VCRedist.2013.x86
Found Microsoft Visual C++ 2013 Redistributable (x86) [Microsoft.VCRedist.2013.x86] Version 12.0.40664.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://download.visualstudio.microsoft.com/download/pr/10912113/5da66ddebb0ad32ebd4b922fd82e8e25/vcredist_x86.exe
  ██████████████████████████████  6.20 MB / 6.20 MB
Successfully verified installer hash
Starting package uninstall...
An unexpected error occurred while executing the command:
0x800401f5 : Application not found

C:\Windows\system32>
C:\Windows\system32>winget upgrade Microsoft.VCRedist.2013.x64
Found Microsoft Visual C++ 2013 Redistributable (x64) [Microsoft.VCRedist.2013.x64] Version 12.0.40664.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://download.visualstudio.microsoft.com/download/pr/10912041/cee5d6bca2ddbcd039da727bf4acb48a/vcredist_x64.exe
  ██████████████████████████████  6.86 MB / 6.86 MB
Successfully verified installer hash
Starting package uninstall...
An unexpected error occurred while executing the command:
0x800401f5 : Application not found

C:\Windows\system32>

Steps to reproduce

  • Install VC++2013 12.0.30501.0
  • Attempt to upgrade using WinGet

Expected behavior

Package updated successfully

Actual behavior

Starting package uninstall...
An unexpected error occurred while executing the command:
0x800401f5 : Application not found

Environment

NOTE: This is Windows 10 21H2 Enterprise LTSC, and it is up to date. I installed WinGet from the .msixbundle distribution linked in this repo. Just mentioning as it is not explicit in the below output.


Windows Package Manager v1.11.430
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19044.6216
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.26.430.0

Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
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
Configuration Modules              %LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules

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
ProxyCommandLineOptions                   Disabled
DefaultProxy                              Disabled

jmtn avatar Aug 21 '25 15:08 jmtn

We've found some similar issues:

  • #4225 , similarity score: 82%
  • #3855 , similarity score: 81%

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.

similar-issues-ai[bot] avatar Aug 21 '25 15:08 similar-issues-ai[bot]

We've found some similar issues:

* [Problem with upgrade command #4225](https://github.com/microsoft/winget-cli/issues/4225) , similarity score: 82%

* [Microsoft Visual C++ 2013 Redistributable (x64) cannot be updated #3855](https://github.com/microsoft/winget-cli/issues/3855) , similarity score: 81%

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.

Thank you Mr. Robot! Both of the referenced issues are with the same version of the same software, but those users are having a different issue where WinGet says there are no updates. In my issue, WinGet says there is an update, but fails to uninstall the existing version.

jmtn avatar Aug 21 '25 15:08 jmtn

I know nothing and this is pure speculation on my part, but other VC redistributables seem like they can be upgraded in place. I'm not sure why it's attempting to uninstall the package at all. But again I don't know anything!

jmtn avatar Aug 21 '25 15:08 jmtn

@jmtn I believe this is because the application is already uninstalled, but the registry entry was not cleaned up in appwiz.cpl (Control Panel > Add or Remove Program). The manifest for VCRedist has UpgradeBehavior: uninstallPrevious specified which means WinGet would try to first uninstall the existing version before installing the new one, and is failing with the uninstall step. What happens if you manually remove the entry from Apps&Features / appwiz.cpl and try again?

This looks related to:

  • #2171

mdanish-kh avatar Aug 27 '25 08:08 mdanish-kh

@jmtn I believe this is because the application is already uninstalled, but the registry entry was not cleaned up in appwiz.cpl (Control Panel > Add or Remove Program). The manifest for VCRedist has UpgradeBehavior: uninstallPrevious specified which means WinGet would try to first uninstall the existing version before installing the new one, and is failing with the uninstall step. What happens if you manually remove the entry from Apps&Features / appwiz.cpl and try again?

This looks related to:

* [Handle already uninstalled applications #2171](https://github.com/microsoft/winget-cli/issues/2171)

Yep, sure enough:

Image

I guess that settles it then. Thank you! As a suggestion, maybe Winget could suggest trying to uninstall the program from appwiz.cpl if this error is triggered?

jmtn avatar Sep 06 '25 18:09 jmtn