# VSCode spawn C:\\WINDOWS\\system32\\cmd.exe ENOENT

**URL:** <https://forum.ansible.com/t/vscode-spawn-c-windows-system32-cmd-exe-enoent/3302>\
**Category:** Get Help\
**Tags:** windows, vscode-ansible, collections\
**Created:** [January 14, 2024, 3:08am UTC](https://forum.ansible.com/t/vscode-spawn-c-windows-system32-cmd-exe-enoent/3302 "2024-01-14T03:08:34Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![marshit](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@marshit](https://forum.ansible.com/u/marshit)\
**Post date:** [January 14, 2024, 3:08am UTC](https://forum.ansible.com/t/vscode-spawn-c-windows-system32-cmd-exe-enoent/3302/1 "2024-01-14T03:08:35Z")

</div>

I have seen this message many times on posts, but I still can’t find a solution that works. I’m running Git version 2.43 on my Windows 10 machine and VSCode version 1.85.1. The cmd.exe file does exist within the path in question.

The problem extension is for Ansible.

Anytime I’m working with an Ansible file, I receive the error below:

 ![uINX6](https://us1.discourse-cdn.com/ansible/original/2X/c/c79c7b72669e305b8c9562d254e71937446232af.png)

It doesn’t prevent me from editing and/or creating playbooks, but it’s annoying to see it all the time. I have reinstalled the Ansible extension multiple times with no success.

---

<div class="post-metadata">

**Author:** ![Sergey\_Kozintsev](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sergey_kozintsev/32/2521_2.png) [@Sergey\_Kozintsev](https://forum.ansible.com/u/Sergey_Kozintsev)\
**Post date:** [March 8, 2024, 9:25am UTC](https://forum.ansible.com/t/vscode-spawn-c-windows-system32-cmd-exe-enoent/3302/2 "2024-03-08T09:25:08Z")

</div>

did you manage to solve this problem? I have the same…

---

<div class="post-metadata">

**Author:** ![marshit](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@marshit](https://forum.ansible.com/u/marshit)\
**Post date:** [March 8, 2024, 4:10pm UTC](https://forum.ansible.com/t/vscode-spawn-c-windows-system32-cmd-exe-enoent/3302/3 "2024-03-08T16:10:42Z")

</div>

@Sergey_Kozintsev No, sir, I sure have not. It’s still a mystery that even VSCode updates have yet to fix along with any Ansible plug-in updates.

---

<div class="post-metadata">

**Author:** ![BlackCrow77](https://avatars.discourse-cdn.com/v4/letter/b/e9bcb4/32.png) [@BlackCrow77](https://forum.ansible.com/u/BlackCrow77)\
**Post date:** [March 9, 2024, 7:35pm UTC](https://forum.ansible.com/t/vscode-spawn-c-windows-system32-cmd-exe-enoent/3302/4 "2024-03-09T19:35:08Z")

</div>

Same here guys…  
Anyway how did you proceed with installation of ansible-lint on Windows?  
I tried with WSL but it doesn’t work as I expected. Sorry for offtop.

---

<div class="post-metadata">

**Author:** ![marshit](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@marshit](https://forum.ansible.com/u/marshit)\
**Post date:** [March 9, 2024, 11:06pm UTC](https://forum.ansible.com/t/vscode-spawn-c-windows-system32-cmd-exe-enoent/3302/5 "2024-03-09T23:06:17Z")

</div>

@BlackCrow77 The only method I used was via WSL as well, but no joy. I’m still receiving the error and can’t get it to disappear.

---

<div class="post-metadata">

**Author:** ![jme](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jme](https://forum.ansible.com/u/jme)\
**Post date:** [March 20, 2024, 12:32pm UTC](https://forum.ansible.com/t/vscode-spawn-c-windows-system32-cmd-exe-enoent/3302/6 "2024-03-20T12:32:31Z")

</div>

When im connected to WSL in VS code I dont receive the error, only locally.  
Im kind of interested in what you mean with “doesn’t work as I expected” ? Because in my case it doesn’t seem to use/recognize the .ansible-lint config file. Same problem for you? sry for offtop guys.

---

<div class="post-metadata">

**Author:** ![Denney-tech](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/denney-tech/32/1556_2.png) [@Denney-tech](https://forum.ansible.com/u/Denney-tech)\
**Post date:** [March 20, 2024, 3:01pm UTC](https://forum.ansible.com/t/vscode-spawn-c-windows-system32-cmd-exe-enoent/3302/7 "2024-03-20T15:01:39Z")

</div>

This is a known issue, but it is not a bug. This happens when the Red Hat Ansible extension tries to run ansible-lint on Windows, but can’t because ansible and ansible-lint doesn’t exist on Windows. The solution is to configure remote extensions for VSCode to run on a remote linux instance (such as inside WSL or a remote linux machine over ssh), or to use VSCode directly on Linux.

Please see marko-hologram’s comment:  
[https://github.com/ansible/vscode-ansible/issues/681#issuecomment-1399360498](https://github.com/ansible/vscode-ansible/issues/681#issuecomment-1399360498)

---

<div class="post-metadata">

**Author:** ![marshit](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@marshit](https://forum.ansible.com/u/marshit)\
**Post date:** [March 20, 2024, 4:39pm UTC](https://forum.ansible.com/t/vscode-spawn-c-windows-system32-cmd-exe-enoent/3302/8 "2024-03-20T16:39:15Z")

</div>

@Denney-tech Thank you. Much appreciated for the feedback. I will take it and run with it!

---

<div class="post-metadata">

**Author:** ![Sergey\_Kozintsev](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sergey_kozintsev/32/2521_2.png) [@Sergey\_Kozintsev](https://forum.ansible.com/u/Sergey_Kozintsev)\
**Post date:** [March 27, 2024, 5:56pm UTC](https://forum.ansible.com/t/vscode-spawn-c-windows-system32-cmd-exe-enoent/3302/9 "2024-03-27T17:56:19Z")

</div>

Thank you! I run this in WSL using your link.

---

<div class="post-metadata">

**Author:** ![marshit](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@marshit](https://forum.ansible.com/u/marshit)\
**Post date:** [March 27, 2024, 11:02pm UTC](https://forum.ansible.com/t/vscode-spawn-c-windows-system32-cmd-exe-enoent/3302/10 "2024-03-27T23:02:40Z")

</div>

For those that want to know, I use WSL now and that has cleared up the error. So the point to it all is like @Denney-tech mentioned just run VSCode on either Linux or WSL on Windows.

---

<div class="post-metadata">

**Author:** ![Denney-tech](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/denney-tech/32/1556_2.png) [@Denney-tech](https://forum.ansible.com/u/Denney-tech)\
**Post date:** [March 28, 2024, 3:31pm UTC](https://forum.ansible.com/t/vscode-spawn-c-windows-system32-cmd-exe-enoent/3302/11 "2024-03-28T15:31:44Z")

</div>

@marshit If you could mark my comment as the answer so that thread shows solved, it will help future readers to find the answer faster.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [April 27, 2024, 3:32pm UTC](https://forum.ansible.com/t/vscode-spawn-c-windows-system32-cmd-exe-enoent/3302/12 "2024-04-27T15:32:33Z")

</div>

Closed on April 27, 2024, 3:32pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
