[error 2147943140 (0x800702e4) when launching `"C:\Program Files\PowerShell\7\pwsh.exe"'] #18693

Closed
opened 2026-01-31 06:21:33 +00:00 by claunia · 6 comments
Owner

Originally created by @superbonaci on GitHub (Oct 15, 2022).

Windows Terminal version

1.16.2642.0

Windows build number

22000.1098

Other Software

No response

Steps to reproduce

Download and install Microsoft.WindowsTerminalPreview_Win11_1.16.2642.0_8wekyb3d8bbwe.msixbundle.

Get this error:

[error 2147943140 (0x800702e4) when launching `"C:\Program Files\PowerShell\7\pwsh.exe"']

Expected Behavior

No response

Actual Behavior

error

Originally created by @superbonaci on GitHub (Oct 15, 2022). ### Windows Terminal version 1.16.2642.0 ### Windows build number 22000.1098 ### Other Software _No response_ ### Steps to reproduce Download and install `Microsoft.WindowsTerminalPreview_Win11_1.16.2642.0_8wekyb3d8bbwe.msixbundle`. Get this error: ``` [error 2147943140 (0x800702e4) when launching `"C:\Program Files\PowerShell\7\pwsh.exe"'] ``` ![](https://i.imgur.com/c7bDJiA.png) ### Expected Behavior _No response_ ### Actual Behavior error
claunia added the Issue-QuestionNeeds-Tag-FixResolution-AnsweredProduct-Terminal labels 2026-01-31 06:21:33 +00:00
Author
Owner

@lhecker commented on GitHub (Oct 17, 2022):

0x800702e4 is ERROR_ELEVATION_REQUIRED. Can you check whether you have marked pwsh.exe as requiring elevation ("Run as Administrator")? If you keep that flag turned on, terminal will not be able to launch it.

@lhecker commented on GitHub (Oct 17, 2022): `0x800702e4` is `ERROR_ELEVATION_REQUIRED`. Can you check whether you have marked `pwsh.exe` as requiring elevation ("Run as Administrator")? If you keep that flag turned on, terminal will not be able to launch it.
Author
Owner

@superbonaci commented on GitHub (Oct 18, 2022):

@lhecker yes that is the issue, C:\Program Files\PowerShell\7\pwsh.exe in Properties -- Compatibility tab it's marked as Run this program as an administrator. So if I launch Terminal Preview as an administrator too the error is gone.

@superbonaci commented on GitHub (Oct 18, 2022): @lhecker yes that is the issue, `C:\Program Files\PowerShell\7\pwsh.exe` in Properties -- Compatibility tab it's marked as `Run this program as an administrator`. So if I launch `Terminal Preview` as an administrator too the error is gone.
Author
Owner

@superbonaci commented on GitHub (Oct 18, 2022):

I've also configured Terminal Preview to launch automatically as administrator from Settings -- Defaults -- Run this profile as Administrator, which is what I really want.

@superbonaci commented on GitHub (Oct 18, 2022): I've also configured Terminal Preview to launch automatically as administrator from Settings -- Defaults -- Run this profile as Administrator, which is what I really want.
Author
Owner

@lhecker commented on GitHub (Oct 18, 2022):

Great! I'm glad the issue is solved.
Personally I would strongly suggest not setting "Run this program as an administrator" on pwsh.exe. Instead find the "PowerShell 7 (x64)" link in the start menu, open its properties and set the setting there. You can even duplicate the link file and have it as a separate item.

I'm really curious though: Why did you set this setting on pwsh.exe? You aren't the first person to do this. Is this part of a tutorial or is something on Windows maybe not working correctly otherwise?

@lhecker commented on GitHub (Oct 18, 2022): Great! I'm glad the issue is solved. Personally I would strongly suggest not setting "Run this program as an administrator" on `pwsh.exe`. Instead find the "PowerShell 7 (x64)" link in the start menu, open its properties and set the setting there. You can even duplicate the link file and have it as a separate item. I'm really curious though: Why did you set this setting on `pwsh.exe`? You aren't the first person to do this. Is this part of a tutorial or is something on Windows maybe not working correctly otherwise?
Author
Owner

@superbonaci commented on GitHub (Oct 18, 2022):

@lhecker because all the scripts I run from there require admin access and I don't want to bother with any UAC or other nuisance.

@superbonaci commented on GitHub (Oct 18, 2022): @lhecker because all the scripts I run from there require admin access and I don't want to bother with any UAC or other nuisance.
Author
Owner

@eduardogallifaochoa commented on GitHub (Jan 28, 2025):

Hey thanks guys this solved my problem! Not even chatgpt was capable of XD lmao Google for the win!

@eduardogallifaochoa commented on GitHub (Jan 28, 2025): Hey thanks guys this solved my problem! Not even chatgpt was capable of XD lmao Google for the win!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18693