I have a problem compiling and uploading code to my Arduino. I was looking up how to do this. I've tried to uninstall and re-install and tried to install some driver, but it always ended up like this.

fork/exec C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++.exe: Access is denied. Error compiling for board Arduino/Genuino Uno.


  • @SDsolar mixed slashes in the path are fine. Windows supports either. In fact the forward slashes are there because the same compilation recipe is used for all OS, and Linux/macOS don't support backslash path separators. – per1234 Apr 18 '18 at 13:14
  • 1
    What if you run the IDE with administrator privileges? – Paul Nov 22 '18 at 8:02
  • Ir works for me when I run IDE with administrator privileges. – Richard G Aug 7 at 1:06

Based on https://forum.arduino.cc/index.php?topic=430850.0 you should try installing Arduino IDE in your user folder (e.g. Documents). Instructions from the linked thread:

  1. Uninstall the existing Arduino IDE

  2. Delete everything arduino-related in C:\users\<your-username>\AppData\Local\

  3. Reinstall Arduino IDE in Documents or another user folder (i.e. under C:\users\<your-username>)

Also please check if it could be antivirus software interfering.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.