Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade of WindowsTerminal fails with 0x80070002 (System cant find the file specified) #1705

Open
pauschar opened this issue Nov 14, 2021 · 29 comments
Labels
Command-Upgrade Issue related to WinGet Upgrade Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@pauschar
Copy link

Brief description of your issue

Trying to upgrade WindowsTerminal fails:

<my PS prompt:> winget upgrade Microsoft.WindowsTerminal
Gefunden Windows Terminal [Microsoft.WindowsTerminal] Version 1.11.2921.0
Diese Anwendung wird von ihrem Besitzer an Sie lizenziert.
Microsoft ist nicht verantwortlich und erteilt keine Lizenzen für Pakete von Drittanbietern.
Der Installer-Hash wurde erfolgreich überprüft
Paketinstallation wird gestartet...
Installieren fehlgeschlagen mit Exitcode: 0x80070002 : The system cannot find the file specified

Steps to reproduce

  • open a PSHell windows
$PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.19041.1237
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.1237
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
  • run winget upgrade Microsoft.WindowsTerminal
  • see it fail

Expected behavior

winget should be able to upgrade WindowsTerminal

Actual behavior

winget fails to upgrade WindowsTerminal

Environment

> winget --info
Windows Package Manager v1.1.12653
Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.

Windows: Windows.Desktop v10.0.19042.1288
Paket: Microsoft.DesktopAppInstaller v1.16.12653.0

Protokolle: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

Links
-----------------------------------------------------------------------------------------
Datenschutzerklärung              https://aka.ms/winget-privacy
Lizenzvereinbarung                https://aka.ms/winget-license
Hinweise von Drittanbietern       https://aka.ms/winget-3rdPartyNotice
Startseite                        https://aka.ms/winget
Windows Store Nutzungsbedingungen https://www.microsoft.com/en-us/storedocs/terms-of-sale
@ghost ghost added the Needs-Triage Issue need to be triaged label Nov 14, 2021
@jedieaston
Copy link
Contributor

Can you run Get-AppxLog from a PowerShell and post the result here? I can replicate this in a Sandbox, but I'm curious if we're having the same issue.

PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs> Get-AppxLog

Time                      ID           Message
----                      --           -------
11/14/2021 3:12:32 PM     603          Started deployment Remove operation on a package with main parameter Microsoft.WindowsTerminal_2021.1019.2143.0_neutral_~_8wekyb3d8bbwe and
                                       Options 0 and 0. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
11/14/2021 3:12:32 PM     10002        Creating Resiliency File
                                       C:\ProgramData\Microsoft\Windows\AppRepository\de362881-e46a-4253-a4d6-2fe9f830949a_S-1-5-21-2047949552-857980807-821054962-504_3.rslc for Remove
                                       Operation on Package Microsoft.WindowsTerminal_2021.1019.2143.0_neutral_~_8wekyb3d8bbwe.
11/14/2021 3:12:32 PM     607          Deployment Remove operation on package Microsoft.WindowsTerminal_2021.1019.2143.0_neutral_~_8wekyb3d8bbwe has been de-queued and is running for
                                       user SID S-1-5-21-2047949552-857980807-821054962-504.
11/14/2021 3:12:32 PM     702          Windows cannot remove Microsoft.WindowsTerminal_2021.1019.2143.0_neutral_~_8wekyb3d8bbwe because the current user does not have that package
                                       installed. Use Get-AppxPackage to see the list of packages installed.
11/14/2021 3:12:32 PM     605          The last successful state reached was BundleProcessed. Failure occurred before reaching the next state Indexed. hr: 0x80073CF1
11/14/2021 3:12:32 PM     401          Deployment Remove operation with target volume C: on Package Microsoft.WindowsTerminal_2021.1019.2143.0_neutral_~_8wekyb3d8bbwe from:   failed
                                       with error 0x80073CF1. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
11/14/2021 3:12:32 PM     404          AppX Deployment operation failed for package Microsoft.WindowsTerminal_2021.1019.2143.0_neutral_~_8wekyb3d8bbwe with error 0x80073CF1. The
                                       specific error text for this failure is: Windows cannot remove Microsoft.WindowsTerminal_2021.1019.2143.0_neutral_~_8wekyb3d8bbwe because the
                                       current user does not have that package installed. Use Get-AppxPackage to see the list of packages installed.


PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs>

Mine seems to imply it's trying to remove a previous version of Windows Terminal (even though it's not installed) and failing.

@pauschar
Copy link
Author

Hi,
thanks for looking into this :-) ... here's the log:

> winget upgrade Microsoft.WindowsTerminal
Gefunden Windows Terminal [Microsoft.WindowsTerminal] Version 1.11.2921.0
Diese Anwendung wird von ihrem Besitzer an Sie lizenziert.
Microsoft ist nicht verantwortlich und erteilt keine Lizenzen für Pakete von Drittanbietern.
Der Installer-Hash wurde erfolgreich überprüft
Paketinstallation wird gestartet...
Installieren fehlgeschlagen mit Exitcode: 0x80070002 : The system cannot find the file specified.
> Get-AppxLog

Time                      ID           Message
----                      --           -------
15.11.2021 11:26:00       603          Started deployment Remove operation on a package with main parameter
                                       Microsoft.WindowsTerminal_2021.1019.2143.0_neutral_~_8wekyb3d8bbwe and Options
                                       0 and 0. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing
                                       app deployment issues.
15.11.2021 11:26:00       10002        Creating Resiliency File C:\ProgramData\Microsoft\Windows\AppRepository\627aeff1
                                       -87f8-4a5a-81ec-a5b0cc43f375_S-1-5-21-839522115-1659004503-725345543-96822_2.rsl
                                       c for Remove Operation on Package
                                       Microsoft.WindowsTerminal_2021.1019.2143.0_neutral_~_8wekyb3d8bbwe.
15.11.2021 11:26:00       607          Deployment Remove operation on package
                                       Microsoft.WindowsTerminal_2021.1019.2143.0_neutral_~_8wekyb3d8bbwe has been
                                       de-queued and is running for user SID
                                       S-1-5-21-839522115-1659004503-725345543-96822.
                                       Microsoft.WindowsTerminal_2021.1019.2143.0_neutral_~_8wekyb3d8bbwe because the
                                       current user does not have that package installed. Use Get-AppxPackage to see
                                       the list of packages installed.
15.11.2021 11:26:00       605          The last successful state reached was BundleProcessed. Failure occurred before
                                       reaching the next state Indexed. hr: 0x80073CF1
15.11.2021 11:26:00       401          Deployment Remove operation with target volume C: on Package
                                       Microsoft.WindowsTerminal_2021.1019.2143.0_neutral_~_8wekyb3d8bbwe from:
                                       failed with error 0x80073CF1. See http://go.microsoft.com/fwlink/?LinkId=235160
                                       for help diagnosing app deployment issues.
15.11.2021 11:26:00       404          AppX Deployment operation failed for package
                                       Microsoft.WindowsTerminal_2021.1019.2143.0_neutral_~_8wekyb3d8bbwe because the
                                       current user does not have that package installed. Use Get-AppxPackage to see
                                       the list of packages installed.
15.11.2021 11:26:00       471          error 0x12C: Deleting file \\?\C:\Program Files\WindowsApps\Deleted\Microsoft.Wi
                                       ndowsTerminal_1.10.2383.0_x64__8wekyb3d8bbweaa07cb22-fff5-4476-94dc-ed55dbdf8ad0
                                       \CascadiaCode.ttf failed.
15.11.2021 11:26:00       471          error 0x12C: Deleting file \\?\C:\Program Files\WindowsApps\Deleted\Microsoft.Wi
                                       ndowsTerminal_1.10.2383.0_x64__8wekyb3d8bbweaa07cb22-fff5-4476-94dc-ed55dbdf8ad0
                                       \CascadiaCodeItalic.ttf failed.
15.11.2021 11:26:00       471          error 0x12C: Deleting file \\?\C:\Program Files\WindowsApps\Deleted\Microsoft.Wi
                                       ndowsTerminal_1.10.2383.0_x64__8wekyb3d8bbweaa07cb22-fff5-4476-94dc-ed55dbdf8ad0
                                       \CascadiaMono.ttf failed.
15.11.2021 11:26:00       493          There were 1 additional files that failed to be deleted under the folder
                                       \\?\C:\Program Files\WindowsApps\Deleted.

I looked through the log, 2 things:

  • ID 607: Actually, I'm running winget upgrade Microsoft.WindowsTerminal from a PS running in WindowsTerminal. So, technically, I have WindowsTerminal installed ... I want to upgrade it. Is this is a hint that upgrading WT through winget only works out of a plain PS, not a WT-one?
    • I checked Get-AppxPackage, tons of output, among the output it has this:
      Name : Microsoft.WindowsTerminal Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US Architecture : X64 ResourceId : Version : 1.10.2714.0 PackageFullName : Microsoft.WindowsTerminal_1.10.2714.0_x64__8wekyb3d8bbwe InstallLocation : C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.10.2714.0_x64__8wekyb3d8bbwe IsFramework : False PackageFamilyName : Microsoft.WindowsTerminal_8wekyb3d8bbwe PublisherId : 8wekyb3d8bbwe IsResourcePackage : False IsBundle : False IsDevelopmentMode : False NonRemovable : False IsPartiallyStaged : False SignatureKind : Store Status : Ok
  • ID 471s: I got myself admin permissions to check C:\Program Files\WindowsApps\Deleted\Microsoft.WindowsTerminal_1.10.2383.0_x64__8wekyb3d8bbweaa07cb22-fff5-4476-94dc-ed55dbdf8ad0. It exists and has those font files. Without being admin, I could not open the folder. Is this is a way of winget telling me that I need to be admin to upgrade WT?

@jedieaston
Copy link
Contributor

You shouldn't need special rights, since you don't need special rights to install WT. You should be able to upgrade it from WT too, as winget will warn you that you need to restart the application to complete the upgrade.

It installs/upgrades just fine from the App Installer GUI too, so I'm not sure what the difference is here. It's not like it's trying to pull dependencies or something.

@jedieaston
Copy link
Contributor

jedieaston commented Nov 15, 2021

I can also replicate this with other Appx packages (in fact, I can't find one that installs, at least inside a Sandbox):

PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs> winget install Automattic.Simplenote
Found Simplenote [Automattic.Simplenote] Version 2.21.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.
Successfully verified installer hash
Starting package install...
Installer failed with exit code: 0x80070002 : The system cannot find the file specified.
PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs> Get-AppxLog

Time                      ID           Message
----                      --           -------
11/15/2021 9:20:05 AM     603          Started deployment Remove operation on a package with main parameter simplenote_2.21.0.0_x64__cdagv53c87npa and Options 0 and 0. See
                                       http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
11/15/2021 9:20:05 AM     10002        Creating Resiliency File
                                       C:\ProgramData\Microsoft\Windows\AppRepository\0a86bb71-8572-4d66-8396-657fb1183209_S-1-5-21-2047949552-857980807-821054962-504_4.rslc for Remove
                                       Operation on Package simplenote_2.21.0.0_x64__cdagv53c87npa.
11/15/2021 9:20:05 AM     607          Deployment Remove operation on package simplenote_2.21.0.0_x64__cdagv53c87npa has been de-queued and is running for user SID
                                       S-1-5-21-2047949552-857980807-821054962-504.
11/15/2021 9:20:05 AM     702          Windows cannot remove simplenote_2.21.0.0_x64__cdagv53c87npa because the current user does not have that package installed. Use Get-AppxPackage to
                                       see the list of packages installed.
11/15/2021 9:20:05 AM     605          The last successful state reached was BundleProcessed. Failure occurred before reaching the next state Indexed. hr: 0x80073CF1
11/15/2021 9:20:05 AM     401          Deployment Remove operation with target volume C: on Package simplenote_2.21.0.0_x64__cdagv53c87npa from:   failed with error 0x80073CF1. See
                                       http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
11/15/2021 9:20:05 AM     404          AppX Deployment operation failed for package simplenote_2.21.0.0_x64__cdagv53c87npa with error 0x80073CF1. The specific error text for this
                                       failure is: Windows cannot remove simplenote_2.21.0.0_x64__cdagv53c87npa because the current user does not have that package installed. Use
                                       Get-AppxPackage to see the list of packages installed.


PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs>

Edit: It works fine for me in a VM. Weird.

@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Needs-Triage Issue need to be triaged labels Nov 16, 2021
@denelon denelon added this to the v1.3-Client milestone Feb 22, 2022
@dhtek
Copy link

dhtek commented Apr 14, 2022

Same error for me :

AppX Deployment operation failed for package Microsoft.WindowsTerminal_1.12.10732.0_neutral_~_8wekyb3d8bbwe with error 0x80073CF1. The specific error text for this failure is: Windows cannot remove Microsoft.WindowsTerminal_1.12.10732.0_neutral_~_8wekyb3d8bbwe because the current user does not have that package installed. Use Get-AppxPackage to see the list of packages installed.

@Gildedter
Copy link

Gildedter commented Aug 22, 2022

Having the same issue

PS C:\WINDOWS\system32> Get-AppxLog

Time                      ID           Message
----                      --           -------
8/22/2022 3:08:21 PM      603          Started deployment Remove operation on a package with main parameter
                                       Microsoft.WindowsTerminal_3001.14.1962.0_neutral_~_8wekyb3d8bbwe and Options 0
                                       and 0. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing
                                       app deployment issues.
8/22/2022 3:08:21 PM      10002        Creating Resiliency File C:\ProgramData\Microsoft\Windows\AppRepository\1e5ca703
                                       -0930-47ad-bd4b-2b7b7f013507_S-1-5-21-2388417700-1335053433-1673113116-1001_11.r
                                       slc for Remove Operation on Package
                                       Microsoft.WindowsTerminal_3001.14.1962.0_neutral_~_8wekyb3d8bbwe.
8/22/2022 3:08:21 PM      607          Deployment Remove operation on package
                                       Microsoft.WindowsTerminal_3001.14.1962.0_neutral_~_8wekyb3d8bbwe has been
                                       de-queued and is running for user SID
                                       S-1-5-21-2388417700-1335053433-1673113116-1001.
8/22/2022 3:08:21 PM      702          Windows cannot remove
                                       Microsoft.WindowsTerminal_3001.14.1962.0_neutral_~_8wekyb3d8bbwe because the
                                       current user does not have that package installed. Use Get-AppxPackage to see
                                       the list of packages installed.
8/22/2022 3:08:21 PM      605          The last successful state reached was BundleProcessed. Failure occurred before
                                       reaching the next state Indexed. hr: 0x80073CF1
8/22/2022 3:08:21 PM      401          Deployment Remove operation with target volume C: on Package
                                       Microsoft.WindowsTerminal_3001.14.1962.0_neutral_~_8wekyb3d8bbwe from:   failed
                                       with error 0x80073CF1. See http://go.microsoft.com/fwlink/?LinkId=235160 for
                                       help diagnosing app deployment issues.
8/22/2022 3:08:21 PM      404          AppX Deployment operation failed for package
                                       Microsoft.WindowsTerminal_3001.14.1962.0_neutral_~_8wekyb3d8bbwe with error
                                       0x80073CF1. The specific error text for this failure is: Windows cannot remove
                                       Microsoft.WindowsTerminal_3001.14.1962.0_neutral_~_8wekyb3d8bbwe because the
                                       current user does not have that package installed. Use Get-AppxPackage to see
                                       the list of packages installed.

I had to reinstall, because fonts installed via scoop (issue) keep breaking my oh-my-posh setup (fonts)

@redactedscribe
Copy link

If anyone runs into this problem just trying to install Windows Terminal, you can use the Microsoft Store source instead:

winget install "windows terminal" --source "msstore"

@johnjaylward
Copy link

If anyone runs into this problem just trying to install Windows Terminal, you can use the Microsoft Store source instead:

winget install "windows terminal" --source "msstore"

Many Group Policies block MsStore. It's not a real work around.

@ahmedsabriz
Copy link

I just installed Windows Terminal v1.15.2874.0 via winget without any issue. This is resolved for me.

@meilon
Copy link

meilon commented Oct 25, 2022

Nope, didn't work for me, still getting Exitcode 0x80070002

@pauschar
Copy link
Author

Hi, *
I'm following this thread every now and then (as the original author) to see whether there is any progress.
I have been updating WindowsTerminal over the last year manually (download .msixbundle and run it, done), but every now and then I retried the winget upgrade Microsoft.WindowsTerminal just to see whether it still shows the 0x80070002 error.

As of today, it still does not work.
I have updated winget to the latest version as of today:

PS C:\projects> winget --info
Windows-Paket-Manager v1.3.2691
Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.

Windows: Windows.Desktop v10.0.19044.2132
Systemarchitektur: X64
Paket: Microsoft.DesktopAppInstaller v1.18.2691.0

Protokolle: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

Links
-----------------------------------------------------------------------------------------
Datenschutzerklärung              https://aka.ms/winget-privacy
Lizenzvereinbarung                https://aka.ms/winget-license
Hinweise von Drittanbietern       https://aka.ms/winget-3rdPartyNotice
Startseite                        https://aka.ms/winget
Windows Store Nutzungsbedingungen https://www.microsoft.com/en-us/storedocs/terms-of-sale

Trying to upgrade WindowsTerminal still gives the 0x8007002 error:

PS C:\projects> winget upgrade Microsoft.WindowsTerminal
Gefunden Windows Terminal [Microsoft.WindowsTerminal] Version 1.15.2874.0
Diese Anwendung wird von ihrem Besitzer an Sie lizenziert.
Microsoft ist nicht verantwortlich und erteilt keine Lizenzen für Pakete von Drittanbietern.
Der Installer-Hash wurde erfolgreich überprüft
Paketinstallation wird gestartet...
Installieren fehlgeschlagen mit Exitcode: 0x80070002 : The system cannot find the file specified.

So, still seems to be an issue. What I would be interested in is the actual error code ... any more details or links what this code actually means?
Thx

@ahmedsabriz
Copy link

I was getting the same error for months until yesterday.

Windows Package Manager v1.3.2691
Windows: Windows.Desktop v10.0.22623.870
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.18.2691.0

@agrexgh
Copy link

agrexgh commented Dec 2, 2022

I ran into this error too, but below works. Thanks a lot!

If anyone runs into this problem just trying to install Windows Terminal, you can use the Microsoft Store source instead:

winget install "windows terminal" --source "msstore"

@trebuh
Copy link

trebuh commented Dec 2, 2022

If anyone runs into this problem just trying to install Windows Terminal, you can use the Microsoft Store source instead:

winget install "windows terminal" --source "msstore"

Many Group Policies block MsStore. It's not a real work around.

This is still blocking

@denelon denelon modified the milestones: v1.4-Client, v1.5-Client Dec 28, 2022
@denelon
Copy link
Contributor

denelon commented Jan 25, 2023

We noticed Windows Terminal had a pair of releases fairly close together. One targets Windows 10 and the other targets Windows 11. The Windows 11 version was higher so users on Windows 10 were not able to install. We need to add minimum OS requirements for search to show the latest version available for an OS rather than just the "latest version".

Is anyone encountering this error on Windows 10?

I noticed this between 1.12 and 1.13.

https://github.com/microsoft/winget-pkgs/blob/20f4efcb2af5c64571a8ca976af64382144aaac8/manifests/m/Microsoft/WindowsTerminal/1.12.10983.0/Microsoft.WindowsTerminal.installer.yaml#L8

https://github.com/microsoft/winget-pkgs/blob/20f4efcb2af5c64571a8ca976af64382144aaac8/manifests/m/Microsoft/WindowsTerminal/1.13.11431.0/Microsoft.WindowsTerminal.installer.yaml#L17

@lucasmarotta
Copy link

lucasmarotta commented Feb 23, 2023

@denelon I tried to install on Windows 11 (22621.1265), with Winget version v1.4.10173, but result in the same error. The command that I used was winget install --id Microsoft.WindowsTerminal -e, but trying with winget install "windows terminal" --source "msstore" did work.

@fsackur
Copy link

fsackur commented Feb 26, 2023

I was getting 0x80070002 at the CLI. However, in the event log Microsoft\Windows\AppXDeployment-Server, I saw failures with code 0x80073CF1 ERROR_INSTALL_PACKAGE_NOT_FOUND - "You may get this error while removing a package that isn't installed for the current user" (look up error codes at Troubleshooting packaging, deployment, and query of Windows apps)

I originally installed Terminal from the MS Store.

Get-AppxLog showed that install and uninstall operations were trying to delete Microsoft.WindowsTerminal_3001.16.10261.0_neutral_~_8wekyb3d8bbwe - note the _3001 - and failing "because the current user does not have that package installed":

Started deployment Remove operation on a package with main parameter Microsoft.WindowsTerminal_3001.16.10261.0_neutral_~_8wekyb3d8bbwe and Options 0 and 0. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
Creating Resiliency File C:\ProgramData\Microsoft\Windows\AppRepository\d9ebce5f-b486-4d36-943d-cc02bfc1012e_S-1-5-21-46638544-3861203688-939887306-1001_4.rslc for Remove Operation on Package Microsoft.WindowsTerminal_3001.16.10261.0_neutral_~_8wekyb3d8bbwe.
Deployment Remove operation on package Microsoft.WindowsTerminal_3001.16.10261.0_neutral_~_8wekyb3d8bbwe has been de-queued and is running for user SID S-1-5-21-46638544-3861203688-939887306-1001.
Windows cannot remove Microsoft.WindowsTerminal_3001.16.10261.0_neutral_~_8wekyb3d8bbwe because the current user does not have that package installed. Use Get-AppxPackage to see the list of packages installed.
The last successful state reached was BundleProcessed. Failure occurred before reaching the next state Indexed. hr: 0x80073CF1
Deployment Remove operation with target volume C: on Package Microsoft.WindowsTerminal_3001.16.10261.0_neutral_~_8wekyb3d8bbwe from:   failed with error 0x80073CF1. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
AppX Deployment operation failed for package Microsoft.WindowsTerminal_3001.16.10261.0_neutral_~_8wekyb3d8bbwe with error 0x80073CF1. The specific error text for this failure is: Windows cannot remove Microsoft.WindowsTerminal_3001.16.10261.0_neutral_~_8wekyb3d8bbwe because the current user does not have that package installed. Use Get-AppxPackage to see the list of packages installed.

I could not see the _3001 package with Get-AppxPackage -AllUsers, only the non-3001 package. What worked was:

Remove-AppxProvisionedPackage -Online -PackageName Microsoft.WindowsTerminal_3001.16.10262.0_neutral_~_8wekyb3d8bbwe

After that, winget install Microsoft.WindowsTerminal worked fine (as non-admin).

Deleting folders from C:\Program Files\WindowsApps ultimately had no effect, although at one point I did bang my head on a folder in C:\Program Files\WindowsApps\Deleted which was referred to in the logs (Microsoft.WindowsAppRuntime.1.2_2000.747.1945.0_x64__8wekyb3d8bbwe6356ff11-e47c-4092-a5df-bf835d1460a5 FWIW.)

@denelon denelon modified the milestones: v1.5-Client, v.Next-Client Apr 18, 2023
@denelon denelon added the Command-Upgrade Issue related to WinGet Upgrade label Jul 20, 2023
@PixelVengeur
Copy link

Reviving this to say that I had the error, and managed to fix it.

Since it was a corporate computer, I couldn't go through the Microsoft Store using winget install "windows terminal" --source "msstore".

I first tried listing my packages using get-appxpackage -alluser | ForEach-Object {Write-Host "$_.PackageFullName"} | Sort-Object as an admin to see what I was working with. I found two releases of Windows Terminal in there, one in 1.15 and one in 1.17. Tried removing each with Remove-AppxProvisionedPackage -Online -PackageName Microsoft.WindowsTerminal_1.1[X].<whatever>, which didn't work (I can't paste the command output since I rebooted afterwards).

The actual way I seemed to have fixed it was using winget list to list out the packages installed, and winget uninstall -e Microsoft.WindowsTerminal_8wekyb3d8bbwe to remove Windows Terminal, in an elevated powershell window. The operation succeeded, I rebooted my machine, and could install Window Terminal like I'm used to with winget install -e Microsoft.WindowsTerminal

@alexeicolin
Copy link

In my case, even after uninstalling WindowsTerminal from all real PC users, it seemed WindowsTerminal was still installed (or staged to be installed?) under some system-user (judging from SID and the profile path in regedit for that SID):

PS C:\Users\alexei> get-appxpackage -alluser | where-object { $_ -like "*erminal*" }

RunspaceId             : d6bad860-3688-498f-ab91-a5e350ad70ce
Name                   : Microsoft.WindowsTerminal
Publisher              : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
PublisherId            : 8wekyb3d8bbwe
Architecture           : X64
ResourceId             :
Version                : 1.17.11461.0
PackageFamilyName      : Microsoft.WindowsTerminal_8wekyb3d8bbwe
PackageFullName        : Microsoft.WindowsTerminal_1.17.11461.0_x64__8wekyb3d8bbwe
InstallLocation        : C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.17.11461.0_x64__8wekyb3d8bbwe
IsFramework            : False
PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}
IsResourcePackage      : False
IsBundle               : False
IsDevelopmentMode      : False
NonRemovable           : False
Dependencies           : {}
IsPartiallyStaged      : False
SignatureKind          : Store
Status                 : Ok

This user SID S-1-5-18 did not show up in output of : wmic useraccount get name,sid

The winget install error:

Found Windows Terminal [Microsoft.WindowsTerminal] Version 1.16.10261.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.
Successfully verified installer hash
Starting package install...
  ████████████████████████████▌   95%
Installer failed with exit code: 0x80070002 : The system cannot find the file specified.

Inspired by previous comment, this fixed the winget install error, in admin shell:

PS C:\Users\alexei> get-appxprovisionedpackage -Online | where {$_.PackageName -like "*terminal*"}

DisplayName  : Microsoft.WindowsTerminal
Version      : 3001.17.11461.0
Architecture : neutral
ResourceId   : ~
PackageName  : Microsoft.WindowsTerminal_3001.17.11461.0_neutral_~_8wekyb3d8bbwe
Regions      : all


PS C:\Users\alexei> get-appxprovisionedpackage -Online | where {$_.PackageName -like "*terminal*"} | Remove-AppxProvisionedPackage -AllUsers

Path          :
Online        : True
RestartNeeded : False


PS C:\Users\alexei> get-appxprovisionedpackage -Online | where {$_.PackageName -like "*terminal*"}
<it is gone>

Then, after that, in a normal user shell: winget install Microsoft.Terminal succeeded.

@elisimpson
Copy link

elisimpson commented Nov 21, 2023

Same issue on multiple Windows 10 PCs when installing or upgrading Terminal. Gets stuck when installing the UI.Xaml.2.8 dep at 95%... every time.

Installer failed with exit code: 0x80070002 : The system cannot find the file specified.

Doesn't occur in Sandbox. Very frustrating

EDIT: the version of UI.Xaml.2.8 that is already installed is as follows:
Microsoft.UI.Xaml.2.8_8.2310.30001.0_x64__8wekyb3d8bbwe.PackageFullName

The Terminal install doesn't seem to be able to install over this or see it as an already fulfilled dependency.

@lm-gh
Copy link

lm-gh commented Nov 21, 2023

I'm having the same issue and reported it here: microsoft/winget-pkgs#111840 (comment)

@awptechnologies
Copy link

having this issue now for windows terminal 1.18.3181.0

@jameshibbard
Copy link

I'm having this issue on multiple PCs (Win 10 + Win 11).
The fixes mentioned above didn't work for me.

@aarsht7
Copy link

aarsht7 commented Nov 27, 2023

If anyone runs into this problem just trying to install Windows Terminal, you can use the Microsoft Store source instead:

winget install "windows terminal" --source "msstore"

This Works for me on Windows 10 as a normal user without elevated terminal access.
For people complaining about the blocking, Following should accept all the terms and should not block the installation.

winget install "windows terminal" --source "msstore" --accept-source-agreements --accept-package-agreements

@lm-gh
Copy link

lm-gh commented Nov 27, 2023

Will probably be followed up here: microsoft/winget-pkgs#128252

@OperativeThunny
Copy link

If anyone runs into this problem just trying to install Windows Terminal, you can use the Microsoft Store source instead:

winget install "windows terminal" --source "msstore"

This Works for me on Windows 10 as a normal user without elevated terminal access. For people complaining about the blocking, Following should accept all the terms and should not block the installation.

winget install "windows terminal" --source "msstore" --accept-source-agreements --accept-package-agreements

this didnt twerk for me here is a shell output of it not twerking:

PS C:\Windows\system32> winget uninstall "windows terminal"
Found Windows Terminal [Microsoft.WindowsTerminal]
Starting package uninstall...
  ██████████████████████████████  100%
Successfully uninstalled
PS C:\Windows\system32> winget upgrade --all
No installed package found matching input criteria.
PS C:\Windows\system32> winget update
No installed package found matching input criteria.
PS C:\Windows\system32> winget install "windows terminal" --source "msstore" --accept-source-agreements --accept-package-agreements
Found Windows Terminal [9N0DX20HK701] Version Unknown
This package is provided through Microsoft Store. winget may need to acquire the package from Microsoft Store on behalf of the current user.
Agreements for Windows Terminal [9N0DX20HK701] Version Unknown
Version: Unknown
Publisher: Microsoft Corporation
Publisher Url: https://github.com/microsoft/terminal
Publisher Support Url: https://github.com/microsoft/terminal/issues/new
Description:
  The Windows Terminal is a modern, fast, efficient, powerful, and productive terminal application for users of command-line tools and shells like Command Prompt, PowerShell, and WSL. Its main features include multiple tabs, panes, Unicode and UTF-8 character support, a GPU accelerated text rendering engine, and custom themes, styles, and configurations.

  This is an open source project and we welcome community participation. To participate please visit https://github.com/microsoft/terminal
License: ms-windows-store://pdp/?ProductId=9N0DX20HK701
Privacy Url: go.microsoft.com/fwlink/?LinkID=521839
Copyright: Copyright (c) Microsoft Corporation
Agreements:
Category: Developer tools
Pricing: Free
Free Trial: No
Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction
Seizure Warning: https://aka.ms/microsoft-store-seizure-warning
Store License Terms: https://aka.ms/microsoft-store-license


Starting package install...
  ██████████████████████████████  100%
Successfully installed
PS C:\Windows\system32> winget upgrade --all
Name             Id           Version     Available   Source
------------------------------------------------------------
Windows Terminal 9N0DX20HK701 1.18.2822.0 1.18.3181.0 winget
1 upgrades available.

Installing dependencies:
This package requires the following dependencies:
  - Packages
      Microsoft.UI.Xaml.2.8 [>= 8.2306.22001.0]
(1/1) Found Windows Terminal [Microsoft.WindowsTerminal] Version 1.18.3181.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.
Installing dependencies:
(1/1) Found Microsoft.UI.Xaml [Microsoft.UI.Xaml.2.8] Version 8.2306.22001.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.
Successfully verified installer hash
Starting package install...
  ████████████████████████████▌   95%
Installer failed with exit code: 0x80070002 : The system cannot find the file specified.

@kiven1999
Copy link

try winget update --id Microsoft.WindowsTerminal --skip-dependencies

@aarsht7
Copy link

aarsht7 commented Nov 28, 2023

It seems you are running the shell as administrative. Try it in the user shell without the administrative right.

@TonnyWildeman
Copy link

The reason why this error persists and is for some not applicable is because there is no way to install an older version of a package.

I have package version 2.8.6 (8.2310.30001) installed of Microsoft.UI.Xaml. And I do not have package version 2.8.5 (8.2306.22001) installed.

Core symptom
The hard dependency of Windows Terminal to Microsoft.UI.Xaml v2.8.5 is preventing the install if a newer version is present on a system.

image

Add-AppXPackage should have the switch -ForceUpdateFromAnyVersion, but that does not do what it should do according to the description.

To fix this, the appxpackage management should get the option to forcefully remove any package. Not looking at any dependencies.

Any one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-Upgrade Issue related to WinGet Upgrade Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests