I had this same exact problem last year and facing it again this year. I need to get Arduino installed on a ton of Windows laptops that will be used by student network accounts. I don't understand how this is supposed to work for students. I tried the MSI installer and all it does is install it under the user account being used to install the application.
This is extremely challenging when trying to get the application to function in a Windows image designed for student use that'll be on 60+ laptops. I want to retirate again that this has nothing to do with the portable version. The installer version should just be nixed all together or a warning should be placed to advise not to use it for imaging. The installer is likely being used by a machine admin therefore the files will go into a folder only accessible by someone with admin rights (not students). The newer issue applies to the portable version as well as the installer version. The issue is solely the problem with mdns-discovery. The application requires input by an end user in Windows to allow firewall access. A non-admin (students in this case) cannot interact and allow the app. If the non-admin hits cancel, the application freezes and Windows starts acting up.
A admin normally can make a firewall exception as long as the path is static. The path is not static for the mdns-discovery because the path to it changes to reflect the user signed in.
all in all, we are not going to be using the application due to the challenges it has presented. The application in its current state is not at all suitable for use in an image used on machines that'll be operated by non-admins.
@ptillisch, can you assist?
Your topic sounds like you have questions about IDE 2.x and hence your topic has been moved to the dedicated IDE 2.x section of the forum.
The IDE does not manage any of these files; it's the responsibility of the Arduino CLI. This problem cannot be fixed in IDE without CLI changes. Here is what is happening:
- IDE starts for the first time,
- IDE checks if there is a CLI configuration to be used at a specific location,
- The CLI config does not exist, hence the IDE will tell the CLI to create the default config file,
- The CLI will create a config file pointing the
directories.data
location inside the current user's local appdata folder (See here in the source code on GitHub)
- The CLI will download the required tools, including the
mdns-discovery.exe
binary into the user's app data folder.
If there were a CLI flag for the arduino-cli config init command to override the directories.*
configuration when creating the CLI config file, the IDE could use this flag and could initialize both the CLI and its own config outside of the student's scope.
When this is possible, the IDE needs to be started with a shortcut icon that appends some extra program argument: --config-file "C:\\Admin\\config\\.arduino-ide"
or something similar.
Of course, this will still require some extra effort from you. Anyway, if the Arduino CLI team helps make these changes, I can contribute the IDE part so your students can use the IDE.
As I understand it, there is a portable version that is supposed to be used by students. The thing is that the laptops will be used by multiple students. It seems like the portable route isn't mean to be accessed by more than one account. Maybe I am wrong about this? Also, which download should I use for the portable? The folder structure for the latest one doesn't match what I see in the folder structure in the screen shot here
https://docs.arduino.cc/software/ide-v1/tutorials/PortableIDE/
No. What you linked is IDE 1.x, not 2.x. 2.x lacks this feature: Add a portable mode · Issue #122 · arduino/arduino-ide · GitHub
What I recommend is required to be implemented.
All your students will edit their sketches in the same sketchbook. If this is not a concern, you could use the ZIP distribution of Arduino IDE 2.x