Install on a system with boot from images can't use installed AVR boards

Hello everyone!

My Arduino install on student desktops doesn't work when started without admin privileges. The error message is "arduino:avr not found" when I try to upload a sketch. Installing AVR Boards works using the admin password, but the error message still appears and "AVR Boards" is still marked as not installed.

-> starting the IDE with admin privileges solves the problem temporarily.
-> portable Arduino had the same problem

We're deploying images (Win 10) on desktop computers. Users are logged in with ActivDirectory profiles and the image is always set back to the original state on a restart.

  • My thought was maybe I can set up accounts for Arduino use and let Arduino IDE start automatically, would that work maybe? Any hints?
  • where are the boards stored, maybe I can change that folder?

Thank you :slight_smile: Sorry if it's the wrong category, didn't find something more fitting.

Do they have internet access? It is needed to do the initial install.

1 Like

Yes, but it needs admin privileges :man_shrugging: I think it's due to a misconfigured Active Directory, but I don't know how to solve it:

loading hardware from C:\users\tmgDefaultProfile\AppData\Local\Arduino15\packages: following possible symlink C:\users\tmgDefaultProfile\AppData\Local\Arduino15\packages: EvalSymlinks: too many links

The said folder isn't accessible, because it's another (default) user... Can I somehow change folders in Arduino IDE?

The only folder you can change in the IDE is the sketch folder and itg doesn't sound like that is the problem.
HOWEVER take a look at the 3rd choice when downloading for windows. The zip file is for a special environment. Carefully research, it may be possible to use that method.

1 Like

Hi @d-103.

They are stored under the packages subfolder of Arduino IDE's "data folder".

The default location of the data folder is:

C:\Users\<username>\AppData\Local\Arduino15\

(Where <username> is the Windows username)

So, for example, on my system where my Windows username is per and I have the latest version 1.8.6 of the "Arduino AVR Boards" platform (machine identifier arduino:avr) installed, it is at this location:

C:\Users\per\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

You can configure the location of the data folder. I'll provide instructions you can follow to do that:

  1. Select File > Quit from the Arduino IDE menus if it is running.
    All IDE windows will close.
  2. Open the file at the following path in any text editor:
    C:\Users\<username>\.arduinoIDE\arduino-cli.yaml
    
    (where <username> is the Windows username)
  3. In the content of the arduino-cli.yaml file, you might see some lines like this:
    directories:
        data: c:\Users\<username>\AppData\Local\Arduino15
    
    If those lines are not already present, add them to the file.
  4. Adjust the value of the directories.data key to the path you want the IDE to use.
  5. Save the file.
  6. Move the files from the previous path to the newly configured path.
  7. Start Arduino IDE.

The path configured via the directories.data field is where Arduino IDE stores the following files:

A couple other paths are also configurable by the file:

  • directories.downloads: The path where Arduino IDE stores the archive files that are downloaded when you install a library via Library Manager or a platform via Boards Manager.
    • By default, these files are stored at the following path:
      c:\Users\<username>\AppData\Local\Arduino15
      
  • directories.user: The path of the Arduino IDE "sketchbook" folder, where libraries installed via Library Manager are stored, as well as being a convenient place to store your sketches. You can also configure this path via Arduino IDE's "Preferences" dialog (accessed via File > Preferences).
  • directories.builtin.libraries: The path where Arduino IDE stores some fundamental libraries, which are automatically installed on the first run after a fresh installation.
    • By default, these files are stored at the following path:
      c:\Users\<username>\AppData\Local\Arduino15\libraries
      

You can learn more about this configuration file from the documentation here:

https://arduino.github.io/arduino-cli/latest/configuration/

For a system administration use case where you are managing numerous accounts, you might find it inconvenient to manually modify the file. This file is written in the common YAML language, so it is fairly easy to set up scripts to modify the file automatically.

The arduino-cli.yaml configuration file can be generated and the data in the file adjusted using the arduino-cli config commands:

https://arduino.github.io/arduino-cli/latest/commands/arduino-cli_config/

For a general purpose command line tool for working with YAML, I can recommend the excellent yq:

You will find that a high quality YAML library is available for each programming language (example).

As @sonofcy mentioned, on the first run after a new installation Arduino IDE downloads some additional essential components from the Internet, and can't start up if it can not do so.

However, the fact that you are getting to the point where you can attempt to upload a sketch indicates that those essential components are already present, so this is not an issue in your system. After that initial installation of the additional components, Arduino IDE will have all its basic functionalities for writing, compiling, and uploading sketches to the Arduino board even when it does not have Internet access. However, you should be aware that some of the additional features do require Internet access:

1 Like

Thank you so much for your thorough response. That's something to work with!

I think our profiles are a mess, the users seem to use some standard profile they can't access and often get temporary profiles on startup :confused: I need to fix this first because I don't know in which of the many folders it's trying to access...

Again, thanks!

You are welcome. I'm glad if I was able to be of assistance.

Regards, Per

1 Like