The latest version of Arduino makes it so that when a user opens the app, it creates a folder for them under their user profile in windows under app data. The problem is that this discovery app requires firewall access. A non admin user cannot allow access. An admin cannot create a firewall rule because the path is specific to the user profile of whoever is using the app. I have absolutely no idea how to get around this. A user cannot just cancel the firewall access message. The entire app just freezes up. How are people resolving this issue?
@rhspower please don't post the same question multiple times to different threads. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend a lot of time investigating and writing a detailed answer on one topic, without knowing that someone else already did the same in the other topic.
This is basic forum etiquette, as explained in the "How to get the best out of this forum" guide. It contains a lot of other useful information. Please read it.
Thanks in advance for your cooperation.
I didn’t post this anywhere else?
What is specific? Can't %AppData% be used in the firewall settings to build the path to the mdns-discovery appliction?
Note:
I'm not a Windows admin.
The user folder reflects the users username
That is what changes for each user logging in
A post was split to a new topic: Old sketches don't work
%AppData% contains the username. My thinking is that you can use that instead of a hardcoded path.
Microsoft says you shouldn't do that and we can't at my large University because we use group policy loopback. Here's the quote from Microsoft: "we recommend that you do not use environment variable strings that resolve only in the context of a certain user (for example, %USERPROFILE%). When these strings are evaluated by the service at runtime, the service is not running in the context of the user. The use of these strings can produce unexpected results."
Arduino IDE 2 cannot be used in a windows computer lab type environment because of this and many other major problems. One of the arduino libraries that has to download for every user (every time in a lab environment of course) tries to install drivers even if those drivers are already installed in advance and so it throws what we call a User Access Control prompt which is a Windows thing that doesn't exist on Mac and Linux it stops administrator tasks from occurring.
This IDE 2.0 forum should just have a sticky post at the top where we list all the installation issues for managed environments where end users don't have full admin rights.
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.datalocation 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.exebinary 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