Disabling windows shell integration
-
How do I disable shell integration? Will this behavior continue if I run NPP from a thumb drive?
I downloaded the standalone version and have spent a few days configuring NPP to my needs. But I noticed that NPP added itself to my windows shell (right click menu). I can get rid of it but can’t find any setting to disable it, else it’ll just keep coming back.
I have written my own shell replacement and that menu is strictly reserved for it. If I allowed everything that wanted added to it then my context menu wouldn’t even fit on my screen in some contexts.
As a ”standalone” it absolutely shouldn’t touch anything on my computer I didn’t ask it to. It’s even running from a folder on my desktop at the moment while I get good copies of the configuration files/settings I want to make more permanent.
-
I downloaded the standalone version
The portable edition (the zipfile) does not enable shell integration. If you have
NppShell_##.dll
in your notepad++.exe directory or...\contextMenu\NppShell.dll
, then at some point you used the installer rather than the portable. -
Searched for NppShell_##.dll but it doesn’t exist. If it’s not normal behavior for NPP to do this I can’t imagine how it happened.
-
It’s in:
HKEY_CLASSES_ROOT\Applications\notepad++.exe\shell\open\command
And points to the temporary location of NPP on my desktop., which doesn’t have a “contextMenu” subfolder. The complete list of included dlls are:
- _CustomizeToolbar.dll
- libcurl.dll
- mimeTools.dll
- NppConverter.dll
- NppExport.dll
- nppPluginList.dll
- sqlite3.dll
-
Searched for NppShell_##.dll but it doesn’t exist
The
##
was a placeholder, not the literal name of the file, you weren’t supposed to search for the literal numbersign character; I had hoped that would be obvious. Since it wasn’t, I will clarify that over time, that changed from01
through06
(which is the last I remember, though my memory is imperfect), so it wasNppShell_00.dll
, thenNppShell_01.dll
, then …, thenNppShell_06.dll
(and so on, if I misremembered the final number).Then in the last few releases, it moved out of the main directory and into the
contextMenu\
subdirectory with the nameNppShell.dll
, with no_##
extra in the name.HKEY_CLASSES_ROOT\Applications\notepad++.exe\shell\open\command
Yes, Windows sets that up if you ever use Windows Open With feature (and possibly in other situations). Again, it wasn’t created by Notepad++ Portable, because the portable does not change the registry (unless you tell it to from the “file association” in the preferences).
-
@PeterJones said in Disabling windows shell integration:
you weren’t supposed to search for the literal numbersign character
I am aware. I searched all dlls as well as the named substring. I never use open with, I have written my own shell replacement, works on both Windows and Linux, to avoid the absurdities of Windows shell management and give Linux Windows level shell management. It also works from the Run command in text editors so that compile/run options don’t need to be individually configured for every editor/file type.
-
@John-Parnell said in Disabling windows shell integration:
I never use open with
I cannot begin to guess how and when Windows wrote that entry, given your denial.
However, in my experience with years of using both the installed and the portable editions of Notepad++, and my understanding from the portions of the codebase I have looked at, notepad++.exe does not write the registry (except if you use Settings > Preferences > File Associations when in Admin mode). Other than that specified circumstance, only the installer, not the notepad++.exe executable itself, writes to the registry. Since the portable zip does not come with the installer, I do not see how it could have been Notepad++ that wrote that entry in the registry – hence, my conclusion is still that Windows wrote that entry at some point when you ran notepad++.exe, whether or not you used Open With
-
It’s making sense that the problem wasn’t fron the standalone package. I searched the Registry and there was some references to NPP in program files that no longer exists. It seems that probably what happened was when Windows failed to find that file reference so redirected to the existing standalone package with that executable once excecuted. I cleaned all Registry reference so Windows wouldn’t have a missing file reference to redirect and it hasn’t returned.
It’s been awhile since I did a good Registry clean.