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.08k stars 1.44k forks source link

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

Open pauschar opened 2 years ago

pauschar commented 2 years ago

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

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

```shell
> 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
jedieaston commented 2 years ago

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 commented 2 years ago

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:

jedieaston commented 2 years ago

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 commented 2 years ago

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.

dhtek commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 1 year ago

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 commented 1 year ago

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

meilon commented 1 year ago

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

pauschar commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

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.)

PixelVengeur commented 1 year ago

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 commented 1 year ago

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 commented 10 months ago

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 commented 10 months ago

I'm having the same issue and reported it here: https://github.com/microsoft/winget-pkgs/issues/111840#issuecomment-1821505278

awptechnologies commented 10 months ago

having this issue now for windows terminal 1.18.3181.0

jameshibbard commented 10 months ago

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

aarsht7 commented 10 months ago

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 commented 10 months ago

Will probably be followed up here: https://github.com/microsoft/winget-pkgs/issues/128252

OperativeThunny commented 10 months ago

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 commented 10 months ago

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

aarsht7 commented 10 months ago

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

TonnyWildeman commented 10 months ago

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