Share via

powershell error running winget opens a "open with" window in windows 11

Anonymous
2022-05-08T23:46:23+00:00

i have tried reinstalling the app manager anything i should try?

Windows for home | Windows 11 | Performance and system failures

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

11 answers

Sort by: Most helpful
  1. Ramesh 176.2K Reputation points Volunteer Moderator
    2022-05-14T02:58:50+00:00

    Hi there,

    It appears from the log that there is an extensionless file named "C:\Windows\System32\winget".

    Simple rename that file and be prepared to be amazed!

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Sumit 43,801 Reputation points Volunteer Moderator
    2022-05-10T02:43:47+00:00

    Troubleshooting here:

    winget-cli/doc/troubleshooting at master · microsoft/winget-cli · GitHub

    Specifically, something related to this:

    1. The App Installer did not automatically add the PATH environment variable. You should add the path environment variable. The value to add is "%userprofile%\AppData\Local\Microsoft\WindowsApps". You can verify this by running %LOCALAPPDATA%\Microsoft\WindowsApps\winget from a command-prompt or & "$env:LOCALAPPDATA\Microsoft\WindowsApps\winget" from a powershell. If the command runs then, but not before, then you very likely have a missing PATH environment component.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2022-05-10T01:07:28+00:00

    Here are other troubleshooting that you can try.

    Solution 1: Reinstall the PowerShell

    1-Click on Start, then search for "Turn Windows feature on or off" and click on that

    2-Uncheck the Windows PowerShell 2.0

    3-Click on Ok

    4-Reboot your PC

    5-Click on Start, then search for "Turn Windows feature on or off" and click on that

    6-Select the Windows PowerShell 2.0

    7-Click on Ok

    8-Reboot your PC

    Solution 2: Reinstall the App Installer

    1-Go to: https://www.microsoft.com/p/app-installer/9nblg...

    2-Click on Get then click to Install

    Solution 3: Perform the repair upgrade using the Windows ISO, this procedure will repair all Windows files and apps.

    1-Download the Windows 11 ISO at this link.

    https://www.microsoft.com/en-gb/software-downlo...

    2-Double-click your ISO file, and click on the setup.exe file.

    3-You may be prompted by User Account Control. Click on Yes if so.

    4-In the Install Windows 11 dialog, click on Change how Setup downloads updates.

    5-Select "Not right now". This will save you from downloading a new build (if available). Click Next.

    6-Setup will check your PC and show a license agreement. Click on Accept in the license terms dialog.

    7-Wait for the setup program to check for the available free space.

    8-On the Ready to install page, click the Change what to keep.

    9-Now, you can select Keep personal files and apps, Keep personal files only, and Nothing. Also, Nothing is the only option that will be available if your installation media doesn't match the installed Windows 11 version or language.

    Note: It is safe to close the setup wizard at this step and cancel the repair install process. Otherwise, you won't be able to cancel it later. Finally, click Next.

    10-Click on Install to start the repair install of Windows 11.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2022-05-09T02:21:44+00:00

    does not help

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2022-05-09T00:50:48+00:00

    Hi, I'm Robinson, and I’m happy to help you today.

    I know how frustrating this may be for you but I'll do my very best to help you.

    Here is some troubleshooting that you can try and should fix this problem.

    Solution 1: Check if doesn't have any corrupt files on the windows.

    1-Right-Click on Start then click on Windows Terminal(admin)

    2- Type these commands.

    sfc /scannow (and press Enter)

    Dism /Online /Cleanup-Image /ScanHealth (and press Enter)

    Dism /Online /Cleanup-Image /CheckHealth (and press Enter)

    3- The DISM tool will report whether the image is healthy, repairable, or non-repairable. If the image is repairable, you can use the /RestoreHealth argument to repair the image.

    4-Type this command and press Enter:

    Dism /Online /Cleanup-Image /RestoreHealth

    Solution 2: Repair the Windows apps.

    1-Right click on Start.

    2-Click on Windows Terminal(admin)

    3-Type:

    Get-AppXPackage -allusers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} and press ENTER.

    4-Reboot your PC

    5-Open the Microsoft Store, click on Library then click on Get and Install updates.

    Was this answer helpful?

    0 comments No comments