There is no way to configure Arduino IDE so that the drivers will not be installed when the user installs the "Arduino AVR Boards" platform via the Arduino IDE Boards Manager.
But if you configure your script to preinstall Arduino AVR Boards on the machine in addition to the drivers, then the user won't need to install it, and thus the UAC prompt will be avoided.
If the location where the boards platform is installed poses a problem for doing this, it is possible to configure Arduino IDE to use a different location. I can provide information about doing that if it will be useful to you.
I exactly have your problem.
I just read most of the "silent installation" arctiles of the last years and none of them could help. Like these:
We want to distribute Arduino 2 to nearly 2000 Windows Clients.
We are still using the old version 1.8.9 because we have not managed to successfully distribute it to the clients since the release of version 2. We distribute almost 1000 different software products on the clients via Microsoft Softwarecenter.
In our company, as in many larger companies, the users do not have admin rights. Users can only install software via the Microsoft Software Center. Automatic updates are switched off for all software products and are carried out centrally by us.
Regardless of whether we are currently using the EXE or MSI, whether ALLUSERS or MSIINSTALLPERUSER or changing WixAppFolder from "WixPerUserFolder" to "WixPerMachineFolder" or other parameters, script versions or anything else. We simply cannot manage to install the software for all users.
I then tried using Orca and Admin Studio Tuner to create an .MST or customize the MSI tables, but these options were also unsuccessful.
I have the same scenario as you. I'm trying to deploy the application for three school labs using a script. However, the problem is that when students and teachers launch the application, they constantly receive UAC prompts to reinstall the drivers. I was wondering if you found a solution to share with me; it would be greatly appreciated.
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 on a Windows machine:
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 on a Windows machine:
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:
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: