We have a group of people working on Arduino projects; using several different boards; using various programmers; requiring mutually incompatible libraries; and developing on various computers. These computers may be Windows, Mac, or Fedora. We do not have permission to install or alter applications, or save files longer than the current session on these machines.
We keep a drop box folder synched to a USB flash drive with everything relevant to a given project. The drive for each project contains complete development environments for all available OS versions, datasheets, code, required libraries, and a project specific preferences.txt file. This way, a person can quickly switch computers and keep working. If a new person needs to get up to speed quickly on a project, just give them a duplicate flash drive. This all works quite well, except the preferences.txt file.
It would be extremely handy to have all the Arduino installations look for the preferences.txt file in a single consistent location on the drive, not on the host computer which may or may not contain its own arduino installation with its own inappropriate preferences.txt file.
How can we accomplish this?
Even if it is not yet easily possible for all OS, how can it be done on just the Windows installation?
I suppose a custom build of each Arduino version from source code may be required. I do not have time to attempt that right now, but it seems like a worthwhile project that many people would find useful. Can anyone point me to where the preferences.txt path is kept in the Windows source code?
Consider this a feature request for an upcoming revision. I do not see why this file was made platform dependent in the first place. Seems unnecessarily more complex and less useful. Can anyone offer some insight?
Dustin Maki
This old question still needs to be answered. It now has another twist.
Version 1.0.x saves to C:\Users\USER\AppData\Roaming\Arduino
while
Version 1.5.x saves to C:\Users\USER\AppData\Roaming\Arduino15.
This effectively allows me to have 1.0 preferences for most of my boards and 1.5 preferences for the Due IDE.
However Galileo uses the same 1.5 preferences file as Due even though it is different IDE. Mutually incompatible versions should NOT share the same file!
Let me save preferences for a given installation in the folder of that installation.
Further, if I open up each of the IDEs at the same time (often the case when I have Due talking to an Uno or Pro Mini while Galileo maintains communication logs) all three use the same filename for the opened file. This creates massive confusion upon saving/closing the file.
Not sure if this was addressed since March 25, 2014 but so far I did not find a way to tell Arduino IDE where to load preferences from.
Solution that comes to mind is to keep separate preferences file for each setup in the project folder and launcher script that will copy the preferences before starting IDE. Disadvantage is that if anything changes you will have to copy the preferences after ending that instance. Or alternatively write much more sophisticated launcher that would monitor IDE instances and copy preferences back as they end.
I am having a similar issue, however as the technician I have administrative privileges, when I extract the non-admin zip folder as a user (with temporary admin rights) I am unable to even open the program it just dies. I have to select run as admin, an option not really available for a classroom of Project lead the Way kids, I shudder to think what they would do with admin rights. It would be lord of the flies in a week! When I do get into the program, the preferences folder is stuck in the local administrator account I have on each workstation! Here's the crazy thing, I'm using my credentials not the local administrator account so why is it installing files in %ADMIN%/appdata/local/arduino15? Does it write to the administrator account in certain circumstances? I wiped one of the machines and was able to get it to work, but it's not feasible to wipe each machine in that lab. Any thoughts?
it seems it is possible with 1.6.7, to create a subfolder "portable" and copy preferences.txt there. Maybe there is this information somewhere officially, but i had to find it by browsing the code
and then i also found a relevant issue for this that contains some bugfix