Well, the problem is that the author of that plug-in seems trying to outwit the "file virtualization" or doesn't care about it. Under .NET it is no problem since the .NET framework will automatically redirect to the correct file location. But in the native world the programmer has to take care about it!
The exact message:
GNU Aspell
Error:
The file "C:/Program Files/Aspell/en.pws" can not be opened for writing.
The cause of this is that since Windows Vista (and of course Windows 7) is using something called "File virtualization" .. Legacy apps shouldn't have a problem with than but …. (MS decided that it should not be allowed to store configuration files etc. in the installation directory ….)
OK, I've had just about enough of the jabbing and miss construed notions about what's wrong with the Aspell/Squiggly setup, let me clear it up once and for all… it's user error, not "File Virtualization". There's nothing wrong with the binaries, they work, and I use them each time I actually use Windows 7 (and yes it's the 64 bit version of Windows, and yes it's the same exact files you downloaded off Sourceforge and yes it's the Unicode version of Npp).
Squiggly, along with Npp and Aspell, are built on the WIN 32 API, are native, not managed, and are source compatible, not binary compatible as is such with .NET framework assemblies. To suggest that using .NET would solve the problem is naive hogwash. %ProgramFiles% is a secure location, and as such a user needs the correct permissions to open a file for writing there. This is why Squiggly uses %AppData% instead as the default location, which the win32 SDK documents as being the correct location for storing application data. en.pws is your personal custom word dictionary file and as such, needs to be able to be written to for purposes of "Adding" new words. Not only is this location user configurable but, when a user chooses a location they don't have permissions to write to, Aspell diligently provides the user with the error displayed in the last post.
All that said, it's VERY important to realize, that I didn't write this plugin with the intention of providing a product to the masses but rather to fulfill a need I had. It's much along the lines of the old adage, if you don't like it, go out and do it yourself… and I did… and I was nice enough to share my work. I didn't gain anything from this project and neither did I promise carefully tested code that would ensure users don't break the independent pieces, or have the opportunity to setup bad configurations. It simply wasn't, and will never be a consideration for the currently released incarnation of Squiggly.
It's also important to note, that Aspell is aging, the Win32 version is woefully out of date, as are the available dictionaries along with the limited number of languages. In light of this, and the laments of past posts, I've been putting my free time into rewriting Squiggly, without Aspell as a dependency at all. This includes a fork and source integration of the Hunspell project directly into the Squiggly dll. It will have "managed" support for over 30 languages, and will dutifully update itself from the repository without user interaction and without the need to install anything additional. Just drop the plugin in and it works. In addition, it's my hope to add thesaurus and hyphening support at some point as well… but first will be the basic spell checking features.
Along with that exciting news it's important to realize, this is allot (and I do mean allot) of work. If it was all so simple, it would have been done along time ago. Therefore, I'm going to stay focused on that goal, and will no longer post to this thread, or any other in regards to the Aspell version of Squiggly, it is what it is and isn't going to change or get better… it will remain a challenge to setup, and will likely not work in future versions of Npp.
When I have a beta I ready for testing of the new plugin, I'll post a notice on the NPP plugins forum and the the Squiggly project page, it's my hope to have something ready in the September-November timeframe for your spell checking pleasure.
TTFN
--
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Note to all users having difficulty. I was just polity informed that if you use the Npp installer to either upgrade or install Npp, there is a tab that has the option "Don't use %APPDATA%". This option forces Npp to store configuration data in the installation directory of Npp by altering %APPDATA% to store data files in the application's installed directory (Program Files in this case). Selecting this option can and will cause the above error in a default install of Npp if the user selects the option, on a system where Npp is installed in any system protected directory.
Also note! There is a CLEAR message on the option that states one should choose this option only if installing to a usb drive (i.e. where the user would have permissions and in which case, the option would be OK)
In my previous post I said that the issue was user error, and this is still true. This note was typed on Npp v. 5.3.9 Unicode, with Squiggly turned on, on a Windows 7 64bit PC… it works. I do however understand that most if not all users are non-technical, and can easily be confused by simple options on installers that seem safe, but in the end result in a bad configuration. Hopefully you can understand that Squiggly is not in a general release state, and is considered BETA… so expect it to have faults like allowing you to install with a bad configuration.
Again, I will re-iterate, I will not answer any more installation questions for the Aspell version of Squiggly… a new one is coming that will hopefully be more appropriate for general use. In the mean time, if it doesn't work for you, then assume you've done something wrong during the installation of either Npp or Squiggly. Try using defaults for both, instead of using fancy options like turning off system variables such as %APPDATA%… most especially if you don't fully understand the ramifications of your choice.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Under the Aspell settings tab, change the 'Custom Dictionary Location' to somewhere you have permissions to write to.
Sorry, but I can't find that option. Using Notepad 5.6.8 (UNICODE) and Aspell v1.3.3 …
Only have:
- Plugins | Spell-Checker | Spell-Checker ….
- Plugins | Spell-Checker | Help …
Also note! There is a CLEAR message on the option that states one should choose this option only if installing to a usb drive (i.e. where the user would have permissions and in which case, the option would be OK)
Maybe a surprise for you but I have forgotten to mention that I used standard installation options when installing NP++!
And the problem ONLY occurs for the user dictionary file! Maybe this was not clear enough? Mea culpa!
And I do not have Squiggly installed and nor I use it at the moment of course! I only using "Spell-Checker".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This works for me. You may say it is improper but everything Windows does is a hack on top of a kludge so… (Im a Linux/BSD guy myself as well) I'll hand-hold the whole way through for the Waaahh it doesn't work right and I'm unable to figure out how to fix it when THE PROGRAM IS TELLING YOU WHAT TO FIX. Don't try to get smart and change these steps as there is a reason for it (Windows BS with file extensions if you need to know)
Also, many elevated security pop-ups will need to be agreed to. This is normal.
-Navigate to your Aspell folder using explorer. in this folder there is a file named COPYING. Right click on it and copy it.
-Navigate into bin folder and paste the file.
-Rename this file from COPYING to en.pws
-Paste the same file again
-Rename this file from COPYING to en.prepl
-Select both files and CUT them and navigate back to the Aspell directory and paste them. Or do it typ-win-user style one at a time if you don't know how to use the CTRL key… :)
-Right click on en.pws file and select properties
-Click Security tab, then click edit.
-Select USERS in the top box, then check the Modify box under the allow column in the lower box
-Repeat this security change for the en.prepl file the same way
-Open the en.pws file with notepad , vim, emacs, or any other TRUE text editor. (Not Wordpad, Not Word, Not LibreOffice)
-Click on edit. Then select all. The press the backspace key deleting everything.
-Type or copy and paste this line:
personal_ws-1.1 en 0
Now I'll clarify some points. This must be the first and the only line. The last character is a ZERO not the letter "O"
-Save the file. It should not bug you for privlege escalation. If it does you already screwed up somewhere above.
-Open the en.prepl file, delete all the text and put in this line:
personal_repl-1.1 en 0
-Save it. And enjoy.
Another way is to copy all the text below and paste into notepad+ saving it as a .bat file (NOT .TXT) and then click start, type cmd, then RIGHT CLICK and run as Administrator.
@echo on
rem Check if Aspell is installed and where otherwise just exit
if not "%ProgramFiles(x86)%"=="" set ProgRoot=%ProgramFiles(x86)%
echo "%ProgRoot%"
if not exist %ProgRoot%\Aspell\bin\aspell.exe (
exit
) else (
> "%ProgRoot%\Aspell\enx.pws" echo personal_ws-1.1 en 0
> "%ProgRoot%\Aspell\enx.prepl" echo personal_repl-1.1 en 0
icacls "%ProgRoot%\Aspell\enx.pws" /grant Users:M
icacls "%ProgRoot%\Aspell\enx.prepl" /grant Users:M
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Aspell and the Notepad++ spell checker plug-in have been working fine for me. But I wanted real time spell checking so I downloaded Squiggly and placed the dll in the Notepad++ plug-in directory. Initially it complained that it couldn't find aspell-15.dll but then I remembered this post:
2010-07-08 07:35:49 PDT
I would seem that the aspell install doesn't for some reason put the apsell/bin directory into path. At least this is the case for me (Windows 7 Home / 64bit). The solution is to add it to the system path manually: - Right click on "computer" in the windows menu; choose properties - Click on "Change Settings" at the bottom right of the pop up window - Click on the new dialog's "advanced" tab - At the bottom, there is an "Environment Variables…" button, click it. - In the second section (System Variables) scroll down until you see "Path"; select it. - Click the "Edit…" button - On the end of the text line add: ;C:\Program Files (x86)\Aspell\bin - Two things to note here; 1) the path above is for the 32 bit install on a 64 bit OS, it could be something different on your box…. look first. and 2) you must not delete the other items in the list! - Click the OK button - Restart notepad++, spell check should work fine. …
So I added the path and now Squiggly works! Thank you ksharif for contributing your nice work and look forward to the new version! :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am a windows programmer. I am telling you it's not user error.
I let the installer use the default settings, and got this.
GNU Aspell Error: The file "C:/Program Files/Aspell/en.pws" can not be opened for writing.
The problem is Aspell using %ProgramFiles%\Aspell\ folder instead of using the %LocalAppData%\Aspell folder.
Aspell is a protected folder.
Clearly this plugin needs to be redone so it can work in vista or windows 7 ready.
I hope this plugin get updated so it can work properly in vista, windows 7, and windows 8.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2012-11-08
I am a windows programmer. I am telling you it's not user error. I let the installer use the default settings, and got this. GNU Aspell Error: The file "C:/Program Files/Aspell/en.pws" can not be opened for writing.
This issue was discussed several times, even in this thread and I guess this will never be fixed. Just look for "Registry Visualization" for an explanation for the cause of the problem.
I agree with you that "default installation" just should work. But it doesn't.
I recommend using the "Don't use %APPDATA%" flag which is offered in the installation screen.
This works for me on Vista and Windows 7.
But sometimes NPP can't write/read the lang.xml file which may has a similar cause or maybe is just a bug.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
ksharif -
thanks for sharing your NP++ spell checker plug-in. mine installed ok (w7 32), i just followed the instructions on the download page. it works fine (except for learn) and i use it frequently. it must be frustrating to make something complicated, give it away, and then get a bunch of grief from people who want everything for free, and right now. if it isn't perfect, drop everything else in your life and fix it, chop-chop.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Notepad++ is the most user-friendly editor I've used so far. It allows me to quickly write, organize the code and tools I need, and switch between various syntaxes. When I'm building a WordPress website, all the CSS and HTML I use are created with Notepad++.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, the problem is that the author of that plug-in seems trying to outwit the "file virtualization" or doesn't care about it. Under .NET it is no problem since the .NET framework will automatically redirect to the correct file location. But in the native world the programmer has to take care about it!
The exact message:
The cause of this is that since Windows Vista (and of course Windows 7) is using something called "File virtualization" .. Legacy apps shouldn't have a problem with than but …. (MS decided that it should not be allowed to store configuration files etc. in the installation directory ….)
Past: %ProgramFiles%\Aspell\en.pws
Now: %LocalAppData%\VirtualStore\Program Files\Aspell\en.pws
… but a lot of C/C++ programmers seems to not care about it ….?
Hope this will be fixed asap (Notepad++ seems to care about it but the Aspell spell checker doesn't handle it ….)
-Harald-René Flasch (aka hfrmobile)
OK, I've had just about enough of the jabbing and miss construed notions about what's wrong with the Aspell/Squiggly setup, let me clear it up once and for all… it's user error, not "File Virtualization". There's nothing wrong with the binaries, they work, and I use them each time I actually use Windows 7 (and yes it's the 64 bit version of Windows, and yes it's the same exact files you downloaded off Sourceforge and yes it's the Unicode version of Npp).
Squiggly, along with Npp and Aspell, are built on the WIN 32 API, are native, not managed, and are source compatible, not binary compatible as is such with .NET framework assemblies. To suggest that using .NET would solve the problem is naive hogwash. %ProgramFiles% is a secure location, and as such a user needs the correct permissions to open a file for writing there. This is why Squiggly uses %AppData% instead as the default location, which the win32 SDK documents as being the correct location for storing application data. en.pws is your personal custom word dictionary file and as such, needs to be able to be written to for purposes of "Adding" new words. Not only is this location user configurable but, when a user chooses a location they don't have permissions to write to, Aspell diligently provides the user with the error displayed in the last post.
All that said, it's VERY important to realize, that I didn't write this plugin with the intention of providing a product to the masses but rather to fulfill a need I had. It's much along the lines of the old adage, if you don't like it, go out and do it yourself… and I did… and I was nice enough to share my work. I didn't gain anything from this project and neither did I promise carefully tested code that would ensure users don't break the independent pieces, or have the opportunity to setup bad configurations. It simply wasn't, and will never be a consideration for the currently released incarnation of Squiggly.
It's also important to note, that Aspell is aging, the Win32 version is woefully out of date, as are the available dictionaries along with the limited number of languages. In light of this, and the laments of past posts, I've been putting my free time into rewriting Squiggly, without Aspell as a dependency at all. This includes a fork and source integration of the Hunspell project directly into the Squiggly dll. It will have "managed" support for over 30 languages, and will dutifully update itself from the repository without user interaction and without the need to install anything additional. Just drop the plugin in and it works. In addition, it's my hope to add thesaurus and hyphening support at some point as well… but first will be the basic spell checking features.
Along with that exciting news it's important to realize, this is allot (and I do mean allot) of work. If it was all so simple, it would have been done along time ago. Therefore, I'm going to stay focused on that goal, and will no longer post to this thread, or any other in regards to the Aspell version of Squiggly, it is what it is and isn't going to change or get better… it will remain a challenge to setup, and will likely not work in future versions of Npp.
When I have a beta I ready for testing of the new plugin, I'll post a notice on the NPP plugins forum and the the Squiggly project page, it's my hope to have something ready in the September-November timeframe for your spell checking pleasure.
TTFN
--
Ksharif,
thank you for your prompt reply!
Please can you provide us a short explanation (one sentence) how to avoid this:
Thanks a lot,
Harald-René Flasch (aka hfrmobile)
Under the Aspell settings tab, change the 'Custom Dictionary Location' to somewhere you have permissions to write to.
Note to all users having difficulty. I was just polity informed that if you use the Npp installer to either upgrade or install Npp, there is a tab that has the option "Don't use %APPDATA%". This option forces Npp to store configuration data in the installation directory of Npp by altering %APPDATA% to store data files in the application's installed directory (Program Files in this case). Selecting this option can and will cause the above error in a default install of Npp if the user selects the option, on a system where Npp is installed in any system protected directory.
Also note! There is a CLEAR message on the option that states one should choose this option only if installing to a usb drive (i.e. where the user would have permissions and in which case, the option would be OK)
In my previous post I said that the issue was user error, and this is still true. This note was typed on Npp v. 5.3.9 Unicode, with Squiggly turned on, on a Windows 7 64bit PC… it works. I do however understand that most if not all users are non-technical, and can easily be confused by simple options on installers that seem safe, but in the end result in a bad configuration. Hopefully you can understand that Squiggly is not in a general release state, and is considered BETA… so expect it to have faults like allowing you to install with a bad configuration.
Again, I will re-iterate, I will not answer any more installation questions for the Aspell version of Squiggly… a new one is coming that will hopefully be more appropriate for general use. In the mean time, if it doesn't work for you, then assume you've done something wrong during the installation of either Npp or Squiggly. Try using defaults for both, instead of using fancy options like turning off system variables such as %APPDATA%… most especially if you don't fully understand the ramifications of your choice.
Sorry, but I can't find that option. Using Notepad 5.6.8 (UNICODE) and Aspell v1.3.3 …
Only have:
- Plugins | Spell-Checker | Spell-Checker ….
- Plugins | Spell-Checker | Help …
Maybe a surprise for you but I have forgotten to mention that I used standard installation options when installing NP++!
And the problem ONLY occurs for the user dictionary file! Maybe this was not clear enough? Mea culpa!
And I do not have Squiggly installed and nor I use it at the moment of course! I only using "Spell-Checker".
@ksharif
Thanks a million for SquigglySpellCheck!
This works for me. You may say it is improper but everything Windows does is a hack on top of a kludge so… (Im a Linux/BSD guy myself as well) I'll hand-hold the whole way through for the Waaahh it doesn't work right and I'm unable to figure out how to fix it when THE PROGRAM IS TELLING YOU WHAT TO FIX. Don't try to get smart and change these steps as there is a reason for it (Windows BS with file extensions if you need to know)
Also, many elevated security pop-ups will need to be agreed to. This is normal.
-Navigate to your Aspell folder using explorer. in this folder there is a file named COPYING. Right click on it and copy it.
-Navigate into bin folder and paste the file.
-Rename this file from COPYING to en.pws
-Paste the same file again
-Rename this file from COPYING to en.prepl
-Select both files and CUT them and navigate back to the Aspell directory and paste them. Or do it typ-win-user style one at a time if you don't know how to use the CTRL key… :)
-Right click on en.pws file and select properties
-Click Security tab, then click edit.
-Select USERS in the top box, then check the Modify box under the allow column in the lower box
-Repeat this security change for the en.prepl file the same way
-Open the en.pws file with notepad , vim, emacs, or any other TRUE text editor. (Not Wordpad, Not Word, Not LibreOffice)
-Click on edit. Then select all. The press the backspace key deleting everything.
-Type or copy and paste this line:
personal_ws-1.1 en 0
Now I'll clarify some points. This must be the first and the only line. The last character is a ZERO not the letter "O"
-Save the file. It should not bug you for privlege escalation. If it does you already screwed up somewhere above.
-Open the en.prepl file, delete all the text and put in this line:
personal_repl-1.1 en 0
-Save it. And enjoy.
Another way is to copy all the text below and paste into notepad+ saving it as a .bat file (NOT .TXT) and then click start, type cmd, then RIGHT CLICK and run as Administrator.
@echo on
rem Check if Aspell is installed and where otherwise just exit
if not "%ProgramFiles(x86)%"=="" set ProgRoot=%ProgramFiles(x86)%
echo "%ProgRoot%"
if not exist %ProgRoot%\Aspell\bin\aspell.exe (
exit
) else (
> "%ProgRoot%\Aspell\enx.pws" echo personal_ws-1.1 en 0
> "%ProgRoot%\Aspell\enx.prepl" echo personal_repl-1.1 en 0
icacls "%ProgRoot%\Aspell\enx.pws" /grant Users:M
icacls "%ProgRoot%\Aspell\enx.prepl" /grant Users:M
Whooops. Testing. Above bat file has wrong filename. Should be en.pws and en.prepl NOT enx.pwn enx.prepl.
Just change it before saving, also can just navigate to it, and right click.. RUN AS ADMINISTRATOR good 2 go.
Aspell and the Notepad++ spell checker plug-in have been working fine for me. But I wanted real time spell checking so I downloaded Squiggly and placed the dll in the Notepad++ plug-in directory. Initially it complained that it couldn't find aspell-15.dll but then I remembered this post:
So I added the path and now Squiggly works! Thank you ksharif for contributing your nice work and look forward to the new version! :)
Exactly ! The Squiggly spellcheck is the best and wasting time on anything else is stupid !
Hello,
Do you know if it's possible to add Spellcheck to Notepad++ on Windows 8 ?
Thanks.
I am a windows programmer. I am telling you it's not user error.
I let the installer use the default settings, and got this.
GNU Aspell Error: The file "C:/Program Files/Aspell/en.pws" can not be opened for writing.
The problem is Aspell using %ProgramFiles%\Aspell\ folder instead of using the %LocalAppData%\Aspell folder.
Aspell is a protected folder.
Clearly this plugin needs to be redone so it can work in vista or windows 7 ready.
I hope this plugin get updated so it can work properly in vista, windows 7, and windows 8.
This issue was discussed several times, even in this thread and I guess this will never be fixed. Just look for "Registry Visualization" for an explanation for the cause of the problem.
I agree with you that "default installation" just should work. But it doesn't.
I recommend using the "Don't use %APPDATA%" flag which is offered in the installation screen.
This works for me on Vista and Windows 7.
But sometimes NPP can't write/read the lang.xml file which may has a similar cause or maybe is just a bug.
http://www.tips.sheringeorge.in/2011/12/enable-aspell-spellchecker-in-windows-7.html
chek this, it explains step by step what is needed to do the job unded win7 32bit and 64bit.
I worked great for me!
I think I found an easier way of getting Notepad++ and Aspell to work with windows 7 64 bit.
Download and install Aspell - http://ftp.gnu.org/gnu/aspell/w32/Aspell-0-50-3-3-Setup.exe
to a folder you have read/write access to, in my case I used -
C:\Users\username\AppData\Roaming\Aspell
Then get the English Dictionary -
http://ftp.gnu.org/gnu/aspell/w32/Aspell-en-0.50-2-3.exe
**Run that and it will unpack the installer to a temporary folder.
From the temporary folder run setup-Aspell-en-0.50-2 and install to the same user data directory - **
C:\Users\username\AppData\Roaming\Aspell
When you run the spellcheck plugin in Notepad++ if it doesn't detect it, tell it that the aspell-15.dll is located in
C:\Users\username\AppData\Roaming\Aspell\bin
In my case everything worked fine after that… when adding works to the dictionary it now saves them to the file:
C:\Users\username\AppData\Roaming\Aspell\en.pws
ksharif -
thanks for sharing your NP++ spell checker plug-in. mine installed ok (w7 32), i just followed the instructions on the download page. it works fine (except for learn) and i use it frequently. it must be frustrating to make something complicated, give it away, and then get a bunch of grief from people who want everything for free, and right now. if it isn't perfect, drop everything else in your life and fix it, chop-chop.
Why are you still using the ridiculous notepad++ spellcheck when an "As you type" spellchecker for notepad++ is available ?
https://sourceforge.net/projects/squiggly
Posts related to cryptocurrency, make money, business and blogging etc are done on the website.
visit website and learn https://inhindigyan.com
Notepad++ is the most user-friendly editor I've used so far. It allows me to quickly write, organize the code and tools I need, and switch between various syntaxes. When I'm building a WordPress website, all the CSS and HTML I use are created with Notepad++.