#255 Error when learning new words in Notepad++

0.50-win
open
nobody
other-app (5)
5
2012-01-01
2012-01-01
R. Schreurs
No

Today, I have installed Aspell with Dutch and English dictionaries: Aspell-0-50-3-3-Setup.exe, Aspell-nl-0.50-2-3.exe and Aspell-en-0.50-2-3.exe. My goal was using the spell-checker in Notepad++ (Notepad++ v 5.8.1 (UNICODE)).
Spell-checking works fine, but learning new words fails with the following error message:
---------------------------
GNU Aspell
---------------------------
Error:
The file "C:/Program Files (x86)/Aspell/nl.pws" can not be opened for writing.
---------------------------
OK
---------------------------

After clicking OK, checking continues and learning another word will fail again, with the same message.

Reproduction:
1. Install Aspell and some dictionary;
2. Install Notepad++;
3. Start Notepad++
4. Type some random text containing spelling errors;
5. Start spell-checking by typing Ctrl-Alt-Shift-S;
6. A pop-up window Spell-Checker appears, showing the first spelling error;
7. Click on the button Learn;
8. The error message appears.

Analysis
In Windows 7, program do not automatically have permission to write inside folders like C:\Program Files (x86)\. This is for security reasons. Even if the user is member of the Local Administrators group, permission is not automatically granted. Only when I run Notepad++ with the option Run as Administrator, will it gain the permissions to write files to these locations.
The program's installation location is not the appropriate location to write user data to. There are three main reasons for this:
1. Several user may use the same installation and would like to maintain their own learned word lists;
2. A user may have a roaming profile, allowing him or her to use various machines with the same settings;
3. Writing files to the program's installation folder may cause problems later when the program is being uninstalled.
The most appropriate default location for the wps files seems to me the %appdata% folder, which is actually something like C:\Users\<current user>\AppData\Roaming\.

Discussion