Arduino IDE asking admin password for each new domain user in Windows lab environment

Hello,

I am managing a Windows computer lab where students log in using Active Directory domain accounts.

I installed Arduino IDE using the Windows Setup EXE while logged in as the local administrator and selected "Install for all users". The installation location is:

C:\Program Files\Arduino IDE

The installation completes successfully and Arduino opens normally under the admin account.

However, when a new domain student account logs in and opens Arduino for the first time, the IDE starts downloading board components and tools again (as if it is the first run). During this process, Windows sometimes prompts for the local administrator password.

(next attempt on another pc, I canceled all pop up which asked admin permission. but it completed the Arduino component installation. )

This is a problem in our lab because students do not have administrator rights.

Environment details:

  • Windows 10 / Windows 11 lab PCs

  • Active Directory domain users

  • Students have standard user permissions

  • Arduino IDE installed using Setup EXE with "Install for all users"

Questions:

  1. Is there a way to pre-install all required components so students do not trigger downloads on first run?

  2. Can the Arduino data directory (Arduino15 / board packages) be configured globally for all users in a lab environment?

  3. What is the recommended deployment method for Arduino IDE in shared computer labs with non-admin users?

Any advice for managing Arduino in a classroom environment would be appreciated.

Thank you.

Hi @chamika2003.

For a system administrator, it will likely be preferrable to provision user accounts via the command line or script. We provide an official tool named Arduino CLI, which is ideal for this purpose:

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

You can configure an arbitrary location for the data directory. Unfortunately, this is done via a configuration file that is stored under the user folder. So it must be configured for each user account individually.

You can use Arduino CLI for this purpose, via its config set command:

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

If you are working with PowerShell, you can use this command:

arduino-cli --config-file "$Env:UserProfile/.arduinoIDE/arduino-cli.yaml" config set directories.data <data directory path>

(where <data directory path> is the path you want Arduino IDE to use as the data directory.

On the first run after a fresh installation, Arduino IDE downloads and installs the following components:

For a system administrator, it will likely be preferrable to preinstall these components via the command line or script. We provide an official tool named Arduino CLI, which is ideal for this purpose:

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

The Arduino AVR Boards platform and its toolchain can be installed via the following command:

arduino-cli --config-file "$Env:UserProfile/.arduinoIDE/arduino-cli.yaml" core install arduino:avr

(reference)

The --config-file argument is required if you are using a custom data directory location. If you are instead using the default data directory location (i.e., $Env:LocalAppData/Arduino15), then you can omit that flag.

If invoked in an interactive context (i.e., working directly from the shell terminal), the default behavior of this command is to also install the Windows drivers. Conversely, if invoked from a non-interactive context (e.g., by a script), the default behavior is to skip the driver installation. You can control this behavior using the --run-post-install or --skip-post-install flags:

https://arduino.github.io/arduino-cli/latest/commands/arduino-cli_core_install/#options

The other tools I listed above will also be installed as a side effect of the arduino-cli core install command.

You can install Arduino_BuiltIn and the foundational libraries via the following command:

arduino-cli --config-file "$Env:UserProfile/.arduinoIDE/arduino-cli.yaml" lib install Arduino_BuiltIn

(reference)

Thanks for the detailed reply! I wasn't aware of the Arduino CLI tool, I’m going to test these commands out on our machines and see if it resolves the admin prompts for the student accounts.

You are welcome. I hope it will be useful. Let us know how it goes.

Regards, Per

I have tried this method, but I got stuck because after completing all the configurations and switching to a local non-admin account, when I run Arduino it starts downloading the components again.

For your reference, I have attached the documentation that I created and followed. very bottom i have attached the script which i used.

# Arduino Lab Deployment Guide (Shared Folder Method)




This guide explains how to deploy Arduino for a computer lab environment

where students use non‑admin accounts. The setup installs Arduino once

on a master PC, prepares all required components, and then copies the

prepared folder to other PCs.




This avoids: - repeated downloads - admin permission prompts - first-run

installation delays for students




The deployment uses: - Arduino IDE - Arduino CLI - A shared Arduino

folder on the C drive




## 1. Prepare the Master PC




Choose one computer as the **master PC**. All Arduino components will be

installed here first.




Log in using a **local administrator account**.




## 2. Create the Arduino Folder Structure




Create a folder on the C drive:




C:`\Arduino`{=tex}




Inside this folder create three subfolders:




C:`\Arduino`{=tex}`\software  `{=tex}

C:`\Arduino`{=tex}`\ArduinoLab  `{=tex} C:`\Arduino`{=tex}`\CLI  `{=tex}




Purpose of each folder:




software\

→ contains the Arduino IDE installation




ArduinoLab\

→ stores boards, libraries, and toolchains installed by Arduino CLI




CLI\

→ contains Arduino CLI executable




## 3. Install Arduino IDE




Run the Arduino IDE installer.




During installation:




-   Select **Install for all users**

-   Choose installation path:




C:`\Arduino`{=tex}`\software`{=tex}




Complete the installation.




IMPORTANT:\

Do NOT open Arduino IDE yet.




## 4. Install Arduino CLI




Download Arduino CLI and install or extract it into:




C:`\Arduino`{=tex}`\CLI`{=tex}




Ensure the executable exists:




C:`\Arduino`{=tex}`\CLI`{=tex}`\arduino`{=tex}-cli.exe




## 5. Run the Configuration Script




Create a script file named:




setup-arduino-lab.bat




Place it inside:




C:`\Arduino`{=tex}




Example path:




C:`\Arduino`{=tex}`\setup`{=tex}-arduino-lab.bat




Example script:




@echo off echo Arduino Lab Configuration

"C:`\Arduino`{=tex}`\CLI`{=tex}`\arduino`{=tex}-cli.exe" config set

directories.data C:`\Arduino`{=tex}`\ArduinoLab`{=tex}

"C:`\Arduino`{=tex}`\CLI`{=tex}`\arduino`{=tex}-cli.exe" core

update-index "C:`\Arduino`{=tex}`\CLI`{=tex}`\arduino`{=tex}-cli.exe"

core install arduino:avr echo Setup Complete pause




Run this script from the administrator account.




This will:




-   configure Arduino CLI data directory

-   download board index

-   install board packages




All components will install into:




C:`\Arduino`{=tex}`\ArduinoLab`{=tex}




## 6. Verify the Installation




Open Arduino IDE from:




C:`\Arduino`{=tex}`\software`{=tex}




Check boards:




Tools → Board




You should see boards such as:




-   Arduino Uno

-   Arduino Nano

-   Arduino Mega




If these appear without downloading anything, the setup is correct.




Close Arduino IDE.




## 7. Copy the Master Arduino Folder




After verifying the setup, copy the entire folder:




C:`\Arduino`{=tex}




This folder now contains:




-   Arduino IDE

-   Arduino CLI

-   all board packages

-   all libraries

-   all tools




## 8. Deploy to Another Lab PC




On each additional computer:




Log in using the **student local account**.




Copy the prepared folder from the master PC and paste it to:




C:`\Arduino`{=tex}




Windows may request administrator credentials when pasting into the C

drive.




## 9. Run the Setup Script on the Student Account




Navigate to:




C:`\Arduino`{=tex}




Run:




setup-arduino-lab.bat




This creates the Arduino configuration file for that user and tells

Arduino IDE to use:




C:`\Arduino`{=tex}`\ArduinoLab`{=tex}




This prevents Arduino from downloading components again.




## 10. Launch Arduino IDE




Open Arduino IDE from:




C:`\Arduino`{=tex}`\software`{=tex}




Test with:




File → Examples → Basics → Blink




Compile the sketch.




If no downloads occur, the setup is successful.




## 11. Create Desktop Shortcut




Create a desktop shortcut pointing to:




C:`\Arduino`{=tex}`\software`{=tex}`\Arduino `{=tex}IDE.exe




Students can launch Arduino directly from the desktop.




## 12. Final Result




Students can:




-   open Arduino IDE

-   compile sketches

-   upload programs to Arduino boards




Students will NOT:




-   see admin prompts

-   download board packages

-   perform first‑run installation




All components are already stored in:




C:`\Arduino`{=tex}`\ArduinoLab`{=tex}

bat script

@echo off
title Arduino Lab Setup

echo ==========================================
echo        Arduino Lab Automatic Setup
echo ==========================================
echo.

set CLI=C:\Arduino\CLI\arduino-cli.exe
set DATA=C:\Arduino\ArduinoLab

if not exist "%CLI%" (
echo ERROR: Arduino CLI not found.
echo Expected location: %CLI%
pause
exit
)

echo Configuring Arduino data directory...
"%CLI%" config set directories.data %DATA%

echo.

echo Updating board index...
"%CLI%" core update-index

echo.

echo Installing Arduino AVR boards and tools...
"%CLI%" core install arduino:avr --run-post-install

echo.

echo Installing common Arduino libraries...
"%CLI%" lib install Arduino_BuiltIn
"%CLI%" lib install Servo
"%CLI%" lib install LiquidCrystal
"%CLI%" lib install Stepper

echo.

echo Installed boards:
"%CLI%" core list

echo.

echo ==========================================
echo Arduino Lab Setup Complete
echo ==========================================
echo.

echo You can now open Arduino IDE from:
echo C:\Arduino\software
echo.

pause

Hey,

Did you ever come up with a solution on this? I am in a similar situation where I need to install the IDE in a Lab environment where the students do not have admin access.

Hi @mr_randall. @chamika2003 was kind enough to share the solution they found in post #6. Did you try that? If so, what problems did you encounter that led you to the conclusion it was insufficient for your needs?

Once we have a better understanding of your situation, we might be able to suggest some adjustments or additional measures.

With no disrespect for the work that has given us IDE 2.x, is 1.8.19 easier to deploy and administer for a classroom environment?

I don't have personal experience with such endeavors, but from my interactions with those who are involved in system administration for institutional environments I would say that it does seem to be the case.

The primary relevant difference is that Arduino IDE 2.x installs several additional components on the first run after a fresh installation (and also automatically updates some of those components as new versions are released). Conversely, the Arduino IDE 1.x installation contains everything required for essential functionality (assuming you are only working with AVR boards).

A possible additional factor is the Arduino IDE 1.x "portable" mode. I have received feedback from some system administrators that they find it challenging to deal with Arduino IDE 2.x storing files under the user folder. That was actually raised in this topic:

There is a solution for this:

Hopefully that solution will be sufficient.

Based on what Chamika stated in post 6 he was not able to get it to work.

I have tried this method, but I got stuck because after completing all the configurations and switching to a local non-admin account, when I run Arduino it starts downloading the components again.

But after digging around it seems the best method is to setup a shared data directory folder and have each user set it using:

arduino-cli.exe --config-file "$Env:UserProfile/.arduinoIDE/arduino-cli.yaml" config set directories.data C:\User\Public\adruino

Not the most cleanest setup as students still need to initially set the data directory before they run the IDE but at least it doesn't ask for admin perms.

My interpretation of that statement was that it referred to the information I provided, while the procedure @chamika2003 shared later in the post was the working solution they had found.

I'm glad you were able to find a solution. Thanks for taking the time to share your findings!

My idea was that this could be done by the system administrator. However, that does assume that the accounts are being managed by a system administrator. If the students manage their own accounts completely independently then of course the solution would rely on action from them.

You could definitely find ways to simplify the task for the students in this event though. I guess you have already done so by providing them with a PowerShell script or batch file they can run.

After reviewing Chamika2003s, most recent post, i can see why the IDE software started downloading components again. His "config set" command doesn't specify the IDE's config path.

echo Configuring Arduino data directory...
"%CLI%" config set directories.data %DATA%

If he added the following as described in your initial post his script would have worked.

--config-file "$Env:UserProfile/.arduinoIDE/arduino-cli.yaml"

I forgot I made those changes on my own script in my last post and I have updated it accordingly. In any case thank you for all your help and I hope Adruino comes up with a better solution in the future.