2

Recently I got the following error in my Windows Terminal:

[error 0x800700c1 when launching "C:\Users\Dry-C Desktop\AppData\Local\Microsoft\WindowsApps\Microsoft.PowerShell_8wekyb3d8bbwe\pwsh.exe"]

How do Image of the Issue - error 0x800700c1

How do I want to know, how can I solve it to fix this?

1 Answers1

3

I solved this issue by changing the Windows Terminal settings.json config file by adding the following:

1 - Find the settings on: Windows Terminal arrow down nearby the tab(s), Click to the settings button, and Click to Open JSON File field.

2 - Add this command to the config file like the example below:

"commandline": "\"C:\\Users\\Your Machine actual Username\\AppData\\Local\\Microsoft\\WindowsApps\\Microsoft.PowerShell_8wekyb3d8bbwe\\pwsh.exe\""

The original Windows Terminal config:

{
   ...
   "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
   "hidden": false,
   "name": "PowerShell",
   "source": "Windows.Terminal.PowershellCore",
},
...

After Change:

{
   ...
   "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
   "hidden": false,
   "name": "PowerShell",
   "source": "Windows.Terminal.PowershellCore",
   "commandline": "\"C:\\Users\\Your Machine actual Username\\AppData\\Local\\Microsoft\\WindowsApps\\Microsoft.PowerShell_8wekyb3d8bbwe\\pwsh.exe\"",
},
...

Don't forget to change You Machine Actual Username in the commandline field.

Ref: https://github.com/microsoft/terminal/issues/6082#issuecomment-1001226003

Or you can follow this blog suggestion that works as well: https://blog.darrenjrobinson.com/error-0x800700c1-when-launching-cprogram-filespowershell7pwsh-exe/

  • 2
    I was just about to post a similar solution following this blog post (https://blog.darrenjrobinson.com/error-0x800700c1-when-launching-cprogram-filespowershell7pwsh-exe/) - note: you can also specify the path in the settings of windows terminal – Guenther Schmitz Jan 01 '22 at 09:56
  • Cool, I read your blog and it worked perfectly too! Thank you @GuentherSchmitz! Thank you for your suggestion and if I'll have the same problem again I'll resort to your blog post! – Ëuclïdës Ďŕÿ'C Jan 01 '22 at 10:07