-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Description
Description of the Issue
If you run Notepad++ in compatibility mode ("Run as Administrator"), you may get the following error when you try to open files using the Windows context menu (that is, right click the file and select "Edit with Notepad++"):
ShellExecute failed (2): Is this command correct?
"C:\Program Files\Notepad++\notepad++.exe"
"C:\Users\Username\Desktop\textfile.txt"
The window name is "Notepad++ Extension: Error" and the window icon is Windows Explorer icon. Even though this happens for me with a clean installation of Notepad++, so without any non-standard extensions or plugins.
Steps to Reproduce the Issue
- Install Notepad++ 7.8.9 (x64)
- Go to Notepad++ install folder and right click notepad++.exe file > properties > compatibility > enable "Run this program as Administrator"
- Right-click any file on your hard disk that Notepad++ can open, and select "Edit with Notepad++"
- Observe error
Expected Behavior
Notepad++ should be able to open files in this manner despite running itself as Administrator. Some people intuitively want to run editors like Notepad++ as admin, to avoid errors of a lack of file access or locked files for which Notepad++ asks the user to restart with administrator privileges, in order to be able to save it. These advanced users might enable this setting in compatibility tab, no matter how effective it is, and will now run into this unnecesary error, and will probably have a hard time figuring out the reason for their error.
Actual Behavior
Notepad++ couldn't open a file using the context menu
