'Notepad++ Extension: Error' when invoking from drop-down

  • Dick Flanagan

    Dick Flanagan - 2013-08-21

    NPP v6.4.5 newly installed. Windows 7.

    When I right-click on a file and select 'Edit with Notepad++' an error box comes up:

    Notepad++ Extension: Error
    ShellExecute failed (2): Is this command correct?
    'C:\Program Files (x86)\Notepad++\notepad++.exe'
    'C:\Users\Owner\Desktop\New Text Document.txt'

    After about three or four tries with different files, Windows Explorer locked up. I reloaded to last restore point, uninstalled NPP, restarted Windows, re-installed NPP, same error when I tried to invoke from right-click drop-down.

    NPP when started by itself works fine. Only when started from the drop-down does the problem occur.

    This is a new problem. I only started using NPP a few days ago, but yesterday NPP worked fine from the drop-down. I don't have a clue what could have happened between then and now to cause this problem. If someone can tell me what the error means, perhaps I can backtrack and figure out what happened to cause it.

    Later: I just thought of something odd that may or may not be related. I set about a dozen different file associations in NPP and then noticed that none of them "took." I.e., I set an association for .txt files, yet double-clicking on a .txt file did not invoke NPP. Just an FYI data point.

    Last edit: Dick Flanagan 2013-08-21
  • Dick Flanagan

    Dick Flanagan - 2013-08-21

    Hi, Loreia.

    My NPP is located in C:\Program Files (x86)\Notepad++\

    I ran Cmd as Admin in that directory and executed:

    regsvr32 NppShell_05.dll

    with a successful response.

    Tried to Edit a txt file from context menu and received same error as I initially reported. I restarted Windows and again received same error when tried to edit from context menu.

    NPP continues to run properly when invoked from Desktop icon or Start menu.

    I will be glad to try any other ideas you might have.

    I am running under Win 7/64

    I have numerous other items in my context menu. Here is a screen shot of the text file I am trying to open and its context menu:


    Here is the actual error message I consistently receive:



    Last edit: Dick Flanagan 2013-08-22
  • Dick Flanagan

    Dick Flanagan - 2013-08-23

    Hi, Loreia.

    Last things first: Changing the value of Showicon did not make any difference (other than to make the icon show up and go away).

    Here is the export of ContextMenuHandlers:






    [HKEY_CLASSES_ROOT*\shellex\ContextMenuHandlers\Cover Designer]



    [HKEY_CLASSES_ROOT*\shellex\ContextMenuHandlers\Open With]

    [HKEY_CLASSES_ROOT*\shellex\ContextMenuHandlers\Open With EncryptionMenu]

    [HKEY_CLASSES_ROOT*\shellex\ContextMenuHandlers\Open with VEDIT]







    @="Taskband Pin"

    @="Start Menu Pin"

    Since other people aren't clamoring to add their "Me, too"s, it would seem this is unique to my system--making it all the more difficult for you to debug. I appreciate all your effort.


    PS: As I think I mentioned before, I am running Windows 7 Pro x64.

  • Dick Flanagan

    Dick Flanagan - 2013-08-29

    I'm guessing this Topic is closed. Too bad.


  • Loreia2

    Loreia2 - 2013-08-29

    Hi Dick,

    sorry for slow answers, I am bus these days.
    Everything looks fine on your computer.

    Can you try to do this:
    1. Download ZIP version, unpack it somewhere
    2. Uninstall NppShell_05.dll in current working directory, using regsvr32 -u NppShell_05.dll
    3. Copy NppShell_05.dll to directory of ZIP version
    4. Install dll here, using: regsvr32 NppShell_05.dll

    Does it work?
    If not, could you trace older versions of NppShell.dll (NppShell_04.dll, NppShell_03.dll and so on) and try with them?


  • Ollie J

    Ollie J - 2013-12-31

    Hi Dick,

    I was having the same problem as you and in the end the problem was that I had configured Notepad++ to run as Administrator.

    As explained here:

    The Windows Explorer shell was running with a lower security clearance than Notepad++, so it was unable to pass messages into it. The immediate solution was to stop running Notepad++ as administrator.

    Of course, the question is: why was I running it as administrator in the first place? In my case it was because the HTML Tidy plugin which I like to use has to update a cfg file in Notepad++'s Program Files folder in order to work; and Windows 8 has Program Files locked down like crazy.

    So in the end I unlocked the Notepad++ Program Files folder as outlined here:

    Then I could happily run Notepad++ as a regular user, and then I could drag & drop or use the ever-handy context menu again.

    I hope this helps you in some way.



Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks