Syntax highlighting for non-administrator users
-
I installed notepad++ using an administrator account and when using notepad++ with a regular non-administrator account, syntax highlighting does not work.
However, when I open it with the administrator account, it works as expected, what permission/folder/file/setting is missing on the non-administrator account to have syntax highlighting to work?
Please advise.
-
@neualex ,
Hmm. For syntax highlighting to “not work”, I would assume that means that the individual user doesn’t have stylers.xml in their
%AppData%\Notepad++\
folder. But if they don’t have that file, when Notepad++ runs, it should copy thestylers.model.xml
from the Notepad++ installation folder (oftenc:\program files\notepad++\
) to that user’s%AppData%\Notepad++\
folder.I guess if there isn’t an
<install_dir>\stylers.model.xml
, then there’s nothing for Notepad++ to copy.Other than that, I cannot see what could go wrong on the syntax highlighting.
If the
Administrator
’s account is working butUserX
’s is not, assuming the user hasn’t customized anything yet, maybe just copy the entire contents of the...\users\Administrator\AppData\Roaming\Notepad++
folder to the...\users\UserX\AppData\Roaming\Notepad++
folder (ie, to their%AppData%\Notepad++
folder) -
@PeterJones said in Syntax highlighting for non-administrator users:
@PeterJones, thanks for the prompt response.stylers.model.xml
does exist inC:\Program Files\Notepad++
Both, admin and non-admin accounts, have the same contents for
%AppData%\Notepad++
, I had to copy admin contents to non-admin to have themes work.Other thoughts?
-
@neualex said in Syntax highlighting for non-administrator users:
Other thoughts?
This is weird. Does
UserX
have write permission to their own%AppData%\Notepad++
folder? (Maybe ifAdministrator
created the...\UserX\Roaming\AppData\Notepad++
folder, the permissions weren’t set correctly)Unfortunately, I don’t have a system where I can easily replicate Administrator doing the install and UserX trying to use it, so I cannot even try to re-create the problem you are having, so I’m taking stabs in the dark.
As always when asking for help in this forum, it’s quite useful if you include the ? menu’s Debug Info data – and in your case, I would recommend for both Administrator and UserX. That sometimes shows us something useful (and makes sure we know exactly what version you have)
You mentioned themes: which theme does UserX have selected? Maybe that theme is not complete for the language you’re syntax-highlighting in?
Is the syntax highlighting that’s missing a builtin highlighter, or is it a UserDefined Language? If the latter, then the userDefineLangs folder must be present in the
%AppData%\Notepad++
… but since you said it’s the same as the Administrator, I would think it would be present.Since you are the administrator, are you willing to do a temporary experiment on their machine? Delete UserX’s
%AppData%\Notepad++\
folder. Download the portable zipfile for the same version that you’re trying to install, and unzip it in a folder that UserX has read and write access to, and make sure UserX has read/write/delete access on doLocalConf.xml. Log out of Administrator and log in as UserX. Run the portable notepad++.exe as UserX, which should run using the portable configuration files, and check if syntax highlighting is okay. (it should be). Exit Notepad++; delete doLocalConf.xml from the portable directory, and re-run the portable notepad++.exe: this should force Notepad++ to create a new%AppData%\Notepad++\
folder for UserX. Check to make sure syntax highlighting still works. Exit the portable Notepad++, and try running the installed Notepad++, which should then pick up the settings that the portable wrote in that folder. Maybe that will fix syntax highlighting?That’s the limit that I can think of for now. Maybe after you’ve replied, I’ll think of something else. And anyone else who wants to chime in, please feel free.
-
@PeterJones, see below.
- UserX has full rights on %AppData%\Notepad++
- Using built-in highlighter.
- Using DeepBlank, but using default theme or any other theme has no luck either.
- Will try the experiment later today and report back.
UserX
Notepad++ v7.9.2 (64-bit)
Build time : Dec 31 2020 - 04:01:34
Path : C:\Program Files\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS Name : Windows 10 Pro (64-bit)
OS Version : 2009
OS Build : 19042.746
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dllAdministrator
Notepad++ v7.9.2 (64-bit)
Build time : Dec 31 2020 - 04:01:34
Path : C:\Program Files\Notepad++\notepad++.exe
Admin mode : ON
Local Conf mode : OFF
OS Name : Windows 10 Pro (64-bit)
OS Version : 2009
OS Build : 19042.746
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll -
I granted UserX read/write permissions to the C:\Program Files\Notepad++ folder and syntax works now.
Thanks for your help!