Installing Arduino in educational "locked down" windows environments

Is there some sort of guide to installing Arduino in typical locked-down educational environments? I'm thinking:

  • A non-administrative user can never install the drivers.
  • A locked-down user may not be able to install executables (ie compilers for additional boards) in their appdata areas?
  • If an administrative user installs arduino and additional boards, the executables for the additional boards may not wind up where they are accessible to other users.
  • so, maybe a "portable" install by the admin, including any additional boards, and then make the individual users reset the sketch folder?

This ought to be a common problem, right? I'm not really up on windows policy management, and I suspect many teachers won't be either, and SysAdmin types may not be familiar with the Arduino tools...

I know a lot of people in this situation who posted on the forum about this have found the portable mode to be useful, but I'd guess there is more to the process than just portable mode alone.

Portable mode leaves the preferences file (including the location of the sketchbook) in the portable directory, which isn’t good if it’s to be shared. Do the preferences entries that use paths accept any kind of “current user” relative paths?

I was thinking the same thing. I would expect at least that they would want each user to have their own sketchbook folder. I tried putting %userprofile%\documents in the File > Preferences > Sketchbook Location field and the IDE just made folders of those names under the portable folder.

I've been experimenting. So far, this looks like a reasonable path:

  • An administrative account installs the latest Arduino IDE, using the installer. This ensures that all drivers are installed.
  • The same administrator runs the IDE and installs all the board packages that will be needed. This will install the new compilers/etc in the users\adminuser\AppData\local\Arduino15 directory; that's OK for now. Exit the IDE.
  • Admin Creates a directory \Program Files\Arduino\portable - then copy all the contents of users\adminuser\AppData\local\Arduino15 into that directory.
  • Change the target for the Arduino desktop shortcut to "C:\Program Files\Arduino\arduino.exe" --preferences-file %userprofile%\Documents\Arduino\preferences.txt
  • Administrator logs out.
  • Standard User logs in.
  • To set up to use Arduino, create a "new Directory" called Arduino in the Documents directory.
  • open a Command Line window and use the command: echo sketchbook.path=%userprofile%\Documents\Arduino > %userprofile%\Documents\Arduino\preferences.txt to set up an initial preferences file (the rest will be filled in automatically the first time the IDE runs.)
  • Run the IDE from the desktop icon. It should work?

I've only tested this with a Win7 VM, and "ordinary" admin/standard users. Steps 7 and 8 could be put in a .bat file, of course.

More experiments later...

westfw: Admin Creates a directory \Program Files\Arduino\portable - then copy all the contents of users\adminuser\AppData\local\Arduino15 into that directory.

What is the reason for this step? Why not create the portable folder first, so the board packages will just be installed straight there?

Why not create the portable folder first, so the board packages will just be installed straight there?

If you use the installer and then add the portable directory in \ProgramFiles, the board manager has fatal trouble trying to create files there (you can run Arduino “as administrator”, but I still had weird problems.)
If you use the .zip file, you have to install the drivers manually (?)

OK, I understand. I always install the Arduino IDE outside of C:\Program Files (x86) for reasons like this.