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:
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.
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.”