Vscode-powershell: Cannot create process, error code 740

Created on 2 Aug 2020  路  10Comments  路  Source: PowerShell/vscode-powershell

Issue Type: Bug

As soon I install the Powershell extension, I get the message The terminal process failed to launch: A native exception occurred during launch (Cannot create process, error code: 740).

Extension version: 2020.6.0
VS Code version: Code 1.47.3 (91899dcef7b8110878ea59626991a18c8a6a1b3e, 2020-07-23T13:12:49.994Z)
OS version: Windows_NT x64 10.0.19041


System Info

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-3687U CPU @ 2.10GHz (4 x 2594)|
|GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: unavailable_off
protected_video_decode: unavailable_off
rasterization: unavailable_off
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: unavailable_off|
|Load (avg)|undefined|
|Memory (System)|7.87GB (0.90GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|


Needs-Repro-Info Resolution - Inactive

Most helpful comment

I'm silly. Powershell 7's exe had 'Run this program as an administrator' checked in the Compatibility tab, but a UAC prompt wasn't coming up when VSC tried using it so I was none the wiser
Unchecked the box, everything's communicating properly now hehe
Happy Friday!

All 10 comments

Thanks @PhilMEFL it would be really helpful if you could also attach the logs--instructions for how to do that are here

In addition to the logs, any extra info about where you see this error and how would be useful. The most useful is a screenshot or a gif of the error occurring and the full text of it.

i'm getting the same error, too

i'm getting the same error, too

Please see the comments above. We need more information to help you

This issue is being closed as inactive, if this issue is still occurring it will be re-opened

Hi,
While I can't speak for OP, I can say that this is currently happening for me. Just got Visual Studio Code today since PowerShell ISE doesn't support powershell 7 by default.
It happens only when I'm running Visual Studio Code as a standard user. If I run Visual Studio Code with administrative rights, it works fine, which is not ideal.
Also, is your ms-vscode.powershell extension supposed to be a Preview? Because that's what it's set to. You have two 'Preview' powershell extensions of different versions, but no production/non-preview extension. The second one is ms-vscode.powershell-preview.
I tried installing 2020.4.0 of ms-vscode.powershell but still get the "Cannot create process, error code: 740" error
image

I'll get some logs tomorrow and e-mail those to [email protected] and run procmon on VSC to see what it's getting hung up on.

@BestUsernameEver2 the preview issue is https://github.com/PowerShell/vscode-powershell/issues/2774.

Can you provide a screenshot of the startup issue as you see it in the UI?

@rjmholt Ahh, that solves the preview mystery then, thank you!

For the startup issue, here's what the UI looks like launching powershell, bottom-right of screenshot:
image

I e-mailed the trace logs over to vscode-powershell just now
I'll see what procmon finds

To followup:
image

I'm silly. Powershell 7's exe had 'Run this program as an administrator' checked in the Compatibility tab, but a UAC prompt wasn't coming up when VSC tried using it so I was none the wiser
Unchecked the box, everything's communicating properly now hehe
Happy Friday!

Was this page helpful?
0 / 5 - 0 ratings