I attempted installing to Program Files instead of the x86 program files directory, this did not solve the problem. I think the issue is that the shell extension is running from a DLL that does not have administrative access. I believe it to be NppShell_04.dll so if we figure out how to tell Windows 7 give that administrative access to run, then we are golden.
–
SteveDec 24 '10 at 19:39

-1 you should've included a keyword from the error in the title, then people will know before they've even clicked
–
barlopSep 11 '11 at 19:20

9 Answers
9

I have Windows 7 64 Bit and I'm working with Notepad++ for more than a year on different Windows 7 64 Bit installation and I never seen such an error. Are you tried complete uninstall, run CCleaner, and installing Notepad++ again?

This is caused when you set Notepad++ to run as administrator on Windows 7.

Go into your registry as an administrator and search for notepad++.exe. Find the key under HKEY_CLASSES_ROOT that has an entry with the Edit with Notepad++ (or maybe Edit with &Notepad++) and delete the entire key. Right click and you should see that you no longer have that option.

Now we re-create it:

Go to:

HKEY_CLASSES_ROOT\*\shell

Create a new key under shell called OpenWithNotepad and create a subkey under that called command.

In the OpenWithNotepad key the default string is what you want the context menu item to be called. I set it to Open with Notepad++.

Still in the OpenWithNotepad key, create a new string value called icon and set the value to path-to-notepad++.exe where path-to-notepad++.exe should be the full path, e.g. C:\Program Files\Notepad++\notepad++.exe.

Under the command key edit the default string value and change it to "path-to-notepad++.exe" "%1" where path-to-notepad++.exe should be the full path, e.g. C:\Program Files\Notepad++\notepad++.exe.

When you right click this option it should now ask you properly for giving Notepad++ admin access to a file.

You still need to go to the properties for notepad++.exe and set it to run as an administrator.

Also, how could we combine this with a method to shut off UAC warnings? Everything I can find uses shortcuts; however this registry fix points directly to the executable. Because let's be frank, it's almost worse to right-click "Edit with Notepad++" a 10 files and then deal with 10 UAC prompts than to save everything to a temporary folder and then moving them to the destination, as is necessary without running Notepad++ as administrator.
–
ArianeJun 5 '13 at 5:14

On my Windows 7 machine (32 bit) I set notepad++ to run as administrator, doing so caused the explorer shell extension to stop working with the "Shell Execute failed" error. Disabling this setting (right click, properties, compatibility...) resolved the issue.
Maybe this is what is causing your problems?
(Now all I need is an "Edit in Notepad++ as Administrator" shell extension....)

This worked for me too. I was using windows 7 ultimate 64bit.
–
moomoochooSep 19 '12 at 15:41

1

The same happended to me when I pinned Notepad++ to the taskbar and checked Shift+Right click -> Properties -> Compatibility -> Run this program as an administrator. Unchecking and selecting Shortcut -> Advanced -> Run as Administrator helped.
–
tooApr 5 '13 at 14:16

Uninstall, clean registry and re-installing didn't work for me. Neither was I running in a compatibility mode so that could not have been my issue.

What the issue was for me is that I checked the option "Run this program as an administrator" in the compatibility tab. I had turned this option on to be able to save e.g. the hosts file. After unchecking this I finally could rightclick and edit files using NotePad++ again.

in case you did not get it fixed yet, i had the same issue and tried all the above.
I had told Notepad++ to start in compatibility mode and got that error. After i turned it off, everything went back to normal.

I've had persistent problems with Notepad++ (on 5.9) in regards to opening/editing files via explorer interface (both direct click to open and right-click to edit..etc). The solution for me has been to install Notepad++ in C:\Program Tools\Notepad++\ - if I try any of the "official" install locations Notepad++ only opens things right when run in admin mode (which is a UAC pain in the arse if you'll pardon my french)