Exec: "cmd": executable file not found in %PATH% PROBLEM (ESP32 Devkit V1)

Hello!

I had problem that many users were faced, and i still stuck in finding out how to solve this problem :

Arduino: 1.8.19 (Windows 7), Board: "DOIT ESP32 DEVKIT V1, 80MHz, 921600, None, Disabled"


C:\Users\Ayah\Documents\Arduino\sketch_jul20a\sketch_jul20a.ino

Using board 'esp32doit-devkit-v1' from platform in folder: C:\Users\Ayah\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.3

Using core 'esp32' from platform in folder: C:\Users\Ayah\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.3

cmd /c if exist "C:\\Users\\Ayah\\Documents\\Arduino\\sketch_jul20a\\partitions.csv" COPY /y "C:\\Users\\Ayah\\Documents\\Arduino\\sketch_jul20a\\partitions.csv" "C:\\Users\\Ayah\\AppData\\Local\\Temp\\arduino_build_712633\\partitions.csv"

**exec: "cmd": executable file not found in %PATH%**
**Error compiling for board DOIT ESP32 DEVKIT V1.**

I've been following up many thread topic with the same problem :

by user: 'petemine'

by user: 'Edin_Fific'

by user: 'artsiha'

i had tried all possible solutions that answered in the topics, but still didn't work. Some things i had tried :

I also had the not defined tag when i tried set %path% in cmd.

None of them are worked

Thank you