Notepad++ v8.5.7 Installer Hangs on regsvr32 command
-
Howdy. I have a brand new Windows 11 laptop that I am setting up for a relative. They are just hip enough to prefer notepad++ over notepad.
I navigated to [the downloads page, apparently i’m not allowed to post links, this was literally just a link to notepad-plus-plus dot org slash downloads slash 8.5.7] and clicked on the big green download button. This gave me a file called npp.8.5.7.installer.x64.exe.
I ran that file, accepted the GPL (it’s so nice to get presented with a license whose contents i already know!), then mashed the ‘next’ button without changing any options until it began installing
It got up to this following point, and then got stuck
[this was a screenshot of the installer, but apparently I am not allowed to upload images either. oh well. the point it got stuck at was the one where it tries to run regsvr32 on the NppShell.dll file]
Going by my vague and hazy knowledge of Windows, i assume the /s flag here is an attempt to silence all user input requirements or interactive prompts, and that it is failing somehow. I assume this has to do with adding the “Edit with Notepad++” line to the context menu associated with the windows UI… shell? (why do they call the GUI a word which specifically means a CLI? whatever)
Sure enough, when I killed the process and found that notepad++ considered itself to be installed, that very important line is missing from the right-click context menu.
Attempting to run the installer again fails, it just hangs at the same place as before. In the end, I ran the command
regsvr32 "C:\Program Files\Notepad++\contextMenu\NppShell.dll"
, it exited with no error codes, but I still don’t have that context menu option.(neither in the default, crappy windows 11 abridged context menu, nor the one I get by clicking “Show more options” which seems to be the real context menu)
How do I get this option to appear in the context menu? For context, I am a unix sysadmin who hasn’t used desktop windows seriously since the days of Windows 7, and who never got very deep into understanding how this system is supposed to work, but who is fairly comfortable with CLI crunch.
Edit: Here is the info listed in the debug help UI element in N++:
Notepad++ v8.5.7 (64-bit)
Build time : Sep 6 2023 - 23:13:49
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 11 Home (64-bit)
OS Version : 21H2
OS Build : 22000.194
Current ANSI codepage : 1252
Plugins :
mimeTools (2.9)
NppConverter (4.5)
NppExport (0.4) -
@John-Wittle said in Notepad++ v8.5.7 Installer Hangs on regsvr32 command:
I ran the command regsvr32 “C:\Program Files\Notepad++\contextMenu\NppShell.dll”, it exited with no error codes, but I still don’t have that context menu option.
When you ran that, was it as normal user or Admin? Because it might be that registering the DLL requires elevated Admin privileges.
Also, maybe try the alternative syntax
regsvr32 /i "C:\Program Files\Notepad++\contextMenu\NppShell.dll"
(as we say in the Manual, “Some users have had more success with one or the other, so if you get an error with one, you may have to try another to get it to work.”)(And I’ve upvoted your post, so you should have enough reputation to post your image now.)
-
I ran with \i as instructed and got a new error message that actually has some novel information and seems relatively important!
The plaintext of the error is:
The module "C:\Program Files\Notepad\contextMenu\NppShell.dll" was loaded but the entry-point DllInstall was not found. Make sure that "C:\Program Files\Notepad++\contextMenu\NppShell.dll" is a valid DLL or OCX file and then try again.
Any chance this is already on the bugtracker? I haven’t actually looked, but this seems a bit too critical to be unknown to the devs
-
@John-Wittle said in Notepad++ v8.5.7 Installer Hangs on regsvr32 command:
actually has some novel information and seems relatively important
Actually, that error message is more indicative of the fact that most people have had to go the other way – switching from using
/i
on older versions of Notepad++, but not using/i
on the newer versions. I just suggested you try it in case you were an exception to that standard rule.this seems a bit too critical to be unknown to the devs
My guess is that you have some sort of outlier circumstances, because most users do not have trouble with the DLL being automatically registered, and they’ve never had to fiddle around with trying to manually register it.
-
@John-Wittle said in Notepad++ v8.5.7 Installer Hangs on regsvr32 command:
It got up to this following point, and then got stuck
Probably not a N++ fault.
You can try (for most of the following you will need admin-rights or it probably silently fails):
- click on the Windows Start (or press the Win-key on your keyboard)
- type “cmd”
- right click on the offered Command Prompt app, select Run as administrator
- in the opened cmd-window - unregister previous attempt before another registering attempt (e.g.: regsvr32 /u “C:\Program Files\Notepad++\contextMenu\NppShell.dll” )
- Logoff/logon (a complete reloading of the Windows Explorer for surety…)
- Then re-register ( regsvr32 “C:\Program Files\Notepad++\contextMenu\NppShell.dll” )
If still not resolved, try to use the NppShell inherent logging:
https://github.com/notepad-plus-plus/nppShell/pull/41
and repeat the above steps.Then collect and post here the created %APPDATA%\NppShell\NppShell.log (i.e. C:\Users\[loginname]\AppData\Roaming\NppShell\NppShell.log)
And do not use the
regsvr32 /i ...
for the new NppShell (there is not such exported “DllInstall” function in it).