Skip to content

VS Code repeatedly reports ComSpec environment variable error despite correct configuration #23928

@NghiemLg

Description

@NghiemLg

Type: Bug

  1. Open VS Code.
  2. Observe the ComSpec environment variable error message in the bottom right corner.
  3. Verify the ComSpec environment variable value by opening Command Prompt and typing echo %ComSpec%.
  4. The returned value is C:\Windows\Sysnative\cmd.exe (correct for Windows 11 64-bit).
  5. Check the Path environment variable and ensure both C:\Windows\System32 and C:\Windows\SysWOW64 are included in the list.

VS Code version: Code 1.92.0 (b1c0a14de1414fcdaa400695b4db1c0799bc3124, 2024-07-31T23:26:45.634Z)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz (16 x 2304)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 7.78GB (1.08GB free)
Process Argv --crash-reporter-id 11ecd845-5c95-4715-b39a-271c849facac
Screen Reader no
VM 0%
Extensions (7)
Extension Author (truncated) Version
debugpy ms- 2024.10.0
python ms- 2024.12.1
vscode-pylance ms- 2024.7.1
cmake-tools ms- 1.18.44
cpptools ms- 1.21.5
cpptools-extension-pack ms- 1.3.0
cmake twx 0.0.17

(1 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
vscorecescf:30445987
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
9c06g630:31013171
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
dwnewjupytercf:31046870
impr_priority:31102340
refactort:31108082
ccplc:31103425
pythonrstrctxt:31103193
wkspc-onlycs-c:31106320
wkspc-ranged-t:31107835

Metadata

Metadata

Assignees

Labels

area-environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugtriage-neededNeeds assignment to the proper sub-team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions