2016/04/03

Solution to problem launching Arduino IDE

This post is a summary of how I solve the problem of unable to launch Arduino IDE 1.6.8 without launching it as System Administrator (with Administrator privileges). In addition, it also deals with how to create a "Portable Arduino IDE" by moving the Sketchbook and preferences.txt to the same folder where the IDE in installed.

Operating System: Windows 8.1

The Arduino IDE is installed under C:\Program Files (x86)\Arduino.




After the IDE is installed, double left click on the IDE icon to launch the IDE. However, the IDE won't launch after displaying the initialization screen below.


Launch the Command Prompt window and change to the folder where the installed IDE is located. Run arduino_debug.exe.

C:\Program Files (x86)\Arduino>arduino_debug
Loading configuration...
Settings issues: Arduino cannot run because it could not
create a folder to store your settings.


Launch as System Administrator.


The IDE is successfully launched (with Administrator privileges).


Note the location of Sketchbook and preferences.txt.


The preferences.txt and other files are located under C:\Users\Wei-Hsiung Huang\AppData\Local\Arduino15.


The Solution:

- Uninstall the IDE;

- Remove the folder and files under Arduino15 (we want to place them under the same directory where the Arduino IDE is located);

- Re-install the IDE on driver C (here I install it in a folder called "ArduinoIDE168").


After the IDE is installed, create a folder called "portable" in the directory where the IDE is installed (note, don't launch the IDE before creating the folder as it won't be launched successfully; without this "portable" folder, the IDE will try to create an "Arduino15" folder under C:\Users\User Name\AppData\Local\ to store data and this action requires Administrator privileges).


After the folder "portable" is created, double left click on arduino.exe to launch the IDE.

In Arduino IDE, go to File -> Preferences to check the location of the Sketchbook and preferences.txt.


The Sketchbook and the preferences.txt are now kept under the folder "portable"



Important -

1. If the folder "portable" is not created, the IDE can only be successfully launched by launching it as System Administrator (below is the message given by arduino_debug.exe).


2. If the IDE is installed in c:\Program Files (x86) and the folder "portable" is in the same folder where the IDE is located, the IDE can only be launched by launching it as System Administrator (Windows 8.1 security feature).

Reference

Sketchbook location on Portable Edition #4103
https://github.com/arduino/Arduino/issues/4103

No comments:

Post a Comment