When you click right-click->Edit with Notepad ++ and get the error “ShellExecute failed (2): Is this command correct?” as seen below:
Solution of ShellExecute Failed (2) Error:
This problem seems to happen after setting Notepad++ to run as administrator on Windows.
To fix it, we will do the following:
1. Open the registry by pressing Win+R (window key and the “r” keys), following by entering “regedit” without the quotes and press enter
2. Go to the HKEY_CLASSES_ROOT key as shown below
3. Search for “notepad++.exe” under that key which has an entry Edit with Notepad++ or Edit with &Notepadd++ (Below is an example)
4. Once found, delete the whole key (it is recommended to take a backup first using right-click->Export first)
If done correctly, the “Edit with Notepad ++” would disappear like shown in the below before/after figure.
Now we need to recreate it but a working version this time.
5. Go to
6. Create a new key under shell called
OpenWithNotepad and create a subkey under that called
command as seen below:
7. Inside the
OpenWithNotepad key, set the (Default) string variable to “Edit with Notepad ++”
8. Create a new string variable called icon and set the value to
path-to-notepad++.exe where path-to-notepad++.exe is the full path, e.g.
C:\Program Files\Notepad++\notepad++.exe. In my case, I had to set it to
C:\Program Files (x86)\Notepad++\notepad++.exe since I am running a windows 64-bit version.
9. Inside the
command key, set the default string as
"path-to-notepad++.exe" "%1" where path-to-notepad++.exe is the full path as we did in step 8
You are done, now you should find a working “Edit with Notepad++” that does not throw out the error in the beginning of this post.
Found this post useful?
Subscribe to our RSS feed, follow us on Twitter or help us grow by sharing our content using the buttons below
Thank you so much!
Your welcome, glad the post helped out
thanks you, the problem has been fixed.
You. Are. Genius. Thank you so, SO very much!
Thanks pal, this worked.
Great write up !! Have been dealing with this on windows 10 for a while.
just a little note, add some images for the last few steps this might help some more people !
Thanks for the kind words LazySmerf.
Regarding adding images for the last few steps, I think that is a great idea and will do so as soon as possible.
Fire the freaking imbeciles that do your captcha. I’m not retyping my entire freaking entry because it timed out in the #$%$%#% time I typed it.
F*** that’s designed by morons.
It’s not the timeout that’s retarded. It’s that it doesn’t do it with a popup AND doesn’t save the page contents for when you hit “back”. So you lose anything you haven’t copied to the clipboard.
AND the time limit is preposterously short — what, 1, 2 minutes, tops? What, is this twitter? Someone should be fired.
No need to use foul language, I had the Captcha enabled to protect the blog from being flooded by spam from automated bots.
In any case, yes the timeout is 120 seconds (2 mins) however no user has pointed it out as a problem in the past and i have not personally faced an issue before. However, to avoid this issue in the future I have bumped it up to 10 mins, hopefully that will avoid users such as yourself from facing this problem in the future.
P.S You could have calmly pointed out the issue and it would have been handled as well. Being rude accomplishes nothing except negatively reflect on your public image (not that you were brave enough to leave your actual name or email but that’s up to you)
The error has gone away, but now I have to give the administrators password everytime, The error had initially appeared when I had selected the “run as administrator” in the properties of Notepad++.exe.
Thank you this worked for me. Too bad Notepad++ doesn’t fix this on one of their updates. On that note, too bad they don’t fix their updates that fail because of elevation
Actually it doesnt work
I would put more information here but the CAPTCHA timed out.
Hello Ted, Tim here (admin of blog). The CAPTCHA timeout is 10 mins, is that not enough time to post the info?
Merci beacoup ! 😀
De rien ?
what happens if I dont have the notepadd++ under HKEY_CLASSES_ROOT ?
Battlefield.4-RELOADED.torrent 😀 😀 😀
Thanks for the advice, but you may need to redo your screenshot, maybe.
Nothing wrong with having a torrent file I never opened ???
Thanks so much! It’s very useful!
Thank you very much!