Hi @dgamst.
Analysis of Problem
On the first run, the IDE checks to see if the arduino:avr platform is installed, if the platform is not installed, it installs it. That installation process includes the driver installation that requires administrator credentials.
If the arduino:avr platform is already installed then the IDE will never attempt a driver installation
So the fact that the IDE is attempting a driver installation indicates that when you run the arduino-cli core install command during your mass deployment, arduino:avr is not being installed to the location where Arduino IDE looks for it.
Solution
So the problem can be solved by doing either one of these two things:
- Configure your
arduino-cli core install command to install arduino:avr to the place Arduino IDE expects it to be.
- Configure Arduino IDE to look for
arduino:avr in the place where the arduino-cli core install command put it.
As you probably already noticed, by default arduino-cli core install installs the platform to this path:
C:\Users\<username>\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\
Arduino IDE also looks for the platform in that path. This leads me to believe the <username> component of the path is different due to the arduino-cli core install command having been ran by a different Windows account than the account used when running Arduino IDE.
I think the best way to solve this might be dependent on the specifics of how the systems you are provisioning are intended to be used. I don't have that information so I can't recommend a specific solution. You are surely more knowledgeable about the subject of system administration than me so I think you will be best able to decide the best solution once you understand the cause of the problem (which I hope I have effectively explained above), and the tools available to solve it, which I will describe below.
Arduino CLI Configuration
arduino-cli core install installs the platform to the packages subfolder of the "Arduino data folder". The path of the data folder used by Arduino CLI can be configured via the directories.data configuration key, which can be set in several ways.
The documentation for the Arduino CLI configuration system is here:
https://arduino.github.io/arduino-cli/latest/configuration/
Arduino IDE Configuration
Arduino IDE looks for the platform in the packages subfolder of the "Arduino data folder". The path of the data folder used by Arduino IDE can be configured via the directories.data configuration key of a configuration file.
The configuration file is located at this path:
C:\Users\<username>\.arduinoIDE\arduino-cli.yaml
This 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/
arduino-cli.yaml is written in the common YAML language. This means that, in case you find arduino-cli config to not be suitable or convenient for your application, you can also use any of the many general purpose tools available for working with data in this format. I can recommend the excellent yq: