Need a way to make newer versions of 2.0 portable

How can I configure system environment variables to relocate libraries and other components to a folder at the root of the C: drive instead of within my profile for Arduino 2.0 and newer?

Hi @JBillos.

The paths are configured via a configuration file, not by environment variables.

I'll provide instructions you can follow to do that:

  1. Select File > Quit from the Arduino IDE menus if it is running.
    All IDE windows will close.
  2. Open the file at the following path in any text editor:
    C:\Users\<username>\.arduinoIDE\arduino-cli.yaml
    
    (where <username> is your Windows username)
  3. In the content of the arduino-cli.yaml file, you will see some lines like this:
    directories:
        data: c:\Users\<username>\AppData\Local\Arduino15
        downloads: C:\Users\<username>\AppData\Local\Arduino15\staging
        user: c:\Users\<username>\Documents\Arduino
    
    Adjust the paths configured in those fields to the paths you want the IDE to use.
  4. Save the file.
  5. Move the files from the previous paths to the newly configured paths.
  6. Start Arduino IDE.

The path configured via the directories.data field is where Arduino IDE stores the following files:

  • The library and package index files used by Library Manager and Boards Manager
  • The "built-in" libraries (e.g., Keyboard, Mouse, Servo).
  • The boards platforms installed via Boards Manager

The path configured via the directories.downloads field is where Arduino IDE stores the archive files that are downloaded when you install a library via Library Manager or a platform via Boards Manager.

The path configured via the directories.user field is the Arduino IDE "sketchbook" folder, where libraries installed via Library Manager are stored, as well as being a convenient place to store your sketches.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.