Major Installation Bug (November 2022, Windows 11)

I had Arduino IDE (2.0) installed on my system (Windows 11) and using it with no problem (also using nightly editions). Once I had it uninstalled, just to have a clean installation of the latest build, but since then the problem begun. The installation completed fine but I never managed to have the program run. Everytime I execute Arduino IDE it sticks on startup screen (this with the green ball pulsing, with infinity symbol on), staying for ever on my screen. I have uninstalled it many times also using registry cleaning tools and re-installed again but with no result. I also have tried Windows compatibility with earlier Windows editions, but finally nothing changed. I don't know what else to do. I always use the latest edition/build. Please help.

Hi @advisor69. I'm going to ask you to post some additional information that might help us to identify the problem.

Please do this:

  1. Start Windows "File Explorer".
  2. Open the Arduino IDE installation folder.
    (usually C:\Program Files\Arduino IDE or C:\Users\<user name>\AppData\Local\Programs\Arduino IDE).
  3. In the folder listing of the Arduino IDE installation folder, hold the Shift key while clicking the right hand button on the mouse.
  4. From the context menu, click "Open PowerShell window here".
    PowerShell will now open with the current directory set to the Arduino IDE installation folder.
  5. Type the following command:
    & ".\Arduino IDE"
    
  6. Press the Enter key.
    Debug output should now be printed to the PowerShell window as the Arduino IDE starts (or fails to start).
  7. Wait until you are sure the Arduino IDE startup process has hung.
  8. Switch back to the PowerShell window.
  9. Right click on the title bar of the PowerShell window.
    This will open a context menu.
  10. Select Edit > Select All from the context menu.
    This will select all the text in the PowerShell window.
  11. Press Ctrl+C.
    This will copy the contents of the PowerShell window to the clipboard.
  12. Open a forum reply here by clicking the Reply button.
  13. Click the </> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block
  14. Press Ctrl+V.
    This will paste the output into the code block.
  15. Move the cursor outside of the code block markup before you add any additional text to your reply.
  16. Click the Reply button to post the output.

Please let me know if you have any questions or problems while following those instructions.

1 Like

That's the Arduino logo :wink:

Same issue here as well.

@shinekraj same instructions from me as well. Provide the logs and I'll help you out.

This is what I have recorded:

daemon ERROR Error: spawn C:\WINDOWS\system32\cmd.exe ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
    at onErrorNT (node:internal/child_process:480:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
daemon ERROR Error: spawn C:\WINDOWS\system32\cmd.exe ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
    at onErrorNT (node:internal/child_process:480:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
daemon INFO Starting daemon from C:\Users\ChiefofStaff\AppData\Local\Programs\Arduino IDE\resources\app\node_modules\arduino-ide-extension\build\arduino-cli.exe...

This block is repeated a huge nunber of times. I juct copied only one block of charsΠρο-διαμορφωμένο κείμενο.

Arduino IDE must have access to the Windows command processor cmd.exe. This error indicates that you have a strange configuration on your computer that somehow does not give access to this essential tool.

Please do this and then comment here to tell me what you find:

  1. Right click the "Start" icon on the left side of the Windows taskbar
  2. Select "System" from the menu.
  3. Click the "Advanced system settings" link you find under the "Related Settings" section of the "Settings" window.
  4. If you get a "User Account Control" dialog, click the Yes button.
  5. In the "System Properties" window, select the "Advanced" tab.
  6. Click the Environment Variables button.

An "Environment Variables" dialog will now open. Look at the list under the "System variables" section of the dialog.

Do you see a variable on the list named "ComSpec"?

Before I start your instructions, I have to tell you that indeed I have an known to me issue with cmd.exe. That was replaced for some reason with Windows PowerShell. There is no cmd.exe anymore in my system (maybe due to a virus?)

Yes, there is a variable named ComSpec having as value: C:\Windows\System32\cmd.exe

What I do next?
Thanks for help.

Wow. That would also cause the problem. The ComSpec variable only tells the system where to find cmd.exe, but if that file is not actually at the path then it will also cause this error.

Unfortunately I'm not very knowledgeable about how to fix that problem. You might be able restore Windows back to the point before the damage was done:

Another option would be to reinstall Windows. That will definitely fix the problem of the missing cmd.exe:

OK, the first thing I will try is to restore (copy) cmd.exe from another healthy Windows 11 system to mine. I'll let you know the results soon.

OK. That was the problem. When I restored cmd.exe to its original location, Arduino IDE loaded like a charm. I also installed the latest nighlty edition. Thank you all for the help.

You are welcome. I'm glad it is working now. Great work on restoring your system to full functionality!

Regards,
Per

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