Boards Manager Permission Error on Arduino SAMD boards

I'm trying to install support for ARDUINO SAMD Boards (32-bits ARM Coretex-Mo+) version 1.8.11.

I have Arduino IDE 1.8.15 installed. In the preferences I have this for additional Boards Manager URLs: https://adafruit.github.io/arduino-board-index/package_adafruit_index.json

When I try to do the install, the display says Step 6 out of 6 completed, and then an error is raised "Error running post install script". The console says:

The system cannot find the path specified.
Access is denied.
The system cannot find the path specified.
java.io.IOException
at cc.arduino.contributions.packages.ContributionInstaller.executeScripts(ContributionInstaller.java:236)
at cc.arduino.contributions.packages.ContributionInstaller.findAndExecutePostInstallScriptIfAny(ContributionInstaller.java:192)
at cc.arduino.contributions.packages.ContributionInstaller.install(ContributionInstaller.java:166)
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$2(ContributionManagerUI.java:172)
at java.lang.Thread.run(Thread.java:748)

I can now compile and load the Blink script so maybe this was just a temporary error. I suspect I have some dodgy environment Path settngs, possibly to non-existent directories.

How can I fix this?

You can see the "post install script" here:
https://github.com/arduino/ArduinoCore-samd/blob/1.8.11/post_install.bat
(there's a copy of it on your computer, but the online source of it is convenient for a quick look)

It's not clear to me which path in particular the error is referring to. If I had to guess, I would suspect that your antivirus software had interfered with the process, but that is simply the bugbear I like to blame when I don't have any real idea of what the problem is.

This batch file installs the drivers for the Arduino SAMD Boards. You can run it directly if you like by following these instructions:

  1. Start the Arduino IDE
  2. Select File > Preferences from the Arduino IDE's menus.
  3. Click the link on the line following "More preferences can be edited directly in the file". This will open the C:\Users\{username}\AppData\Local\Arduino15 folder. It was convenient to access it via the Arduino IDE because the AppData folder is hidden by Windows File Explorer by default, making it difficult to navigate to normally.
  4. Navigate to the packages\arduino\hardware\samd\1.8.11 subfolder of the Arduino15 folder.
  5. Double click on the file post_install.bat.
  6. Depending on your Windows security settings, you may now get a dialog from User Account Control asking whether you want to allow dpinst-amd64.exe (the driver installer) to make changes to your system. Spend a moment considering whether it's wise to follow the advice of a random stranger on the Internet, and then click the Yes button.
1 Like

This is the result of running the script (I've removed the @echo OFF's):

C:\Users\dqj99\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11>post_install.bat

C:\Users\dqj99\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11>set ARGS=/SE /SW /SA

C:\Users\dqj99\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11>if "AMD64" == "AMD64" (drivers\dpinst-amd64.exe /SE /SW /SA )  ELSE IF "" == "AMD64" (drivers\dpinst-amd64.exe /SE /SW /SA )  ELSE (drivers\dpinst-x86.exe /SE /SW /SA )

C:\Users\dqj99\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11>setlocal

C:\Users\dqj99\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11>for /F "tokens=4-5 delims=[.] " %i in ('ver') do @(if %i == Version (set VERSION=%j )  else (set VERSION=%i ) )
The system cannot find the path specified.

C:\Users\dqj99\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11>if 10 GEQ 10 (exit /b 0 )

C:\Users\dqj99\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11>

I'm still not much wiser as to what directory it failed to find.

P.S. I was wrong to say that I could install scripts, I mistook the fading flashing of the LED on the baord for correct execution of the blink script. It seems that I have a (possibly separate) bootloader issue.

I can't help with your problem

The fading of the onboard led indicates that the boot loader is active.