Notepad++: “nppcm.dll needs to be in the same directory than notepad++.exe”

In the last few weeks, I’ve been having problems launching Notepad++ from the context menu as I usually do. Instead of it launching properly after I select the “Edit with Notepad++” option, I get an error:

Notepad++ error dialog showing the message "Error creating process: nppcm.dll needs to be in the same directory than notepad++.exe"

Encountered in Notepad++ 5.3.1 when launching from the Vista context menu

To get around the error, I had to use the File-Open menu from Notepad++, and locate the file I wanted to open. This was acceptable for a while, but eventually my patience with the issue wore thin.

Solution

I figured out why it was happening. The problem was that the “notepad++.exe” file was set to automatically prompt for administrative privileges via User Account Control. This works fine if you’re launching Notepad++ from a start menu or desktop shortcut, but apparently the context menu didn’t like the setting.

To “fix” this problem, remove the automatic UAC prompt from the Notepad++ shortcut/executable. This restores the context menu option to working order. Matt, what if it needs administrative privileges, you say? Well, as far as I know, the only feature that actually needs administrative privileges is the Update feature. This means you’ll have to launch Notepad++ with administrative privileges manually whenever you want to check for updates, which isn’t great… but at least the above error is no longer an issue.

If that doesn’t work for you, I’ve heard of others that solved this issue by deleting a mysterious extension-lacking “Program” file in their hard-drive root; however, the file didn’t exist on my system. Given how out-right bizarre this file sounds, I would highly recommend you avoid taking that approach – it just doesn’t sound right. I don’t see why Notepad++ would save a file in the root – and if they are going to do so, why name it in such a generic fashion? In any case, if any of you spot this file… please let me know what it contains.

Update: Many thanks to Bram, who wrote a comment about encountering  the “Program” file:

“I had the same problem here, and I also had the file called ‘Program’ in the root folder. That file was 0 KB, so completely empty. It’s not guaranteed that notepad++ somehow creates this file. Anyways, after rebooting the machine, my Windows Server 2003 came up with a warning that there was a file called program in the root which may cause other programs to function incorrectly bla bla bla. Renaming into Program1 solves the issue, and so does deleting the file completely.”

  • Bram

    I had the same problem here, and I also had the file called 'Program' in the root folder. That file was 0 KB, so completely empty. It's not guaranteed that notepad++ somehow creates this file. Anyways, after rebooting the machine, my Windows Server 2003 came up with a warning that there was a file called program in the root which may cause otyher programs to function incorrectly bla bla bla. Renaming into Program1 solves the issue, and so does deleting the file completely.

    • Thanks! I've updated the post to include this new information.

  • MisterB

    "To "fix" this problem, remove the automatic UAC prompt from the Notepad++ shortcut/executable."

    fine it works, same problem with windows7

  • Ngan

    Thanks for the tip. Fixed my problem.

  • Shaun

    Thanks! I've been struggling with this problem for a while.

  • Fixed my problem but, im add a privilege for windows vista to edit from FTP plugin notepad++ to written in my local HDD.

  • This helped me ! thanks!

  • Qriz

    What I did was:

    doubleclick rather than rightclick what led me to choose a standard program for this file extension and now it works.

  • CS


    Well, as far as I know, the only feature that actually needs administrative privileges is the Update feature.  ”

    you need elevation in order to edit protected system files..

  • Shaedo

    Same problem different fix. I did not have a file called Program anywhere on my computer. I moved the install files from the ‘Program Files’ directory to ‘Program Files (x86)’ directory. This appears to have solved the problem.