Community
    • Login

    File association and registering as the default application

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    default applicaassociations
    15 Posts 5 Posters 13.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • PeterJonesP
      PeterJones
      last edited by

      @Shamay-Moti,

      I understand your frustration.

      Since you cannot seem to OpenWith, even when you manually select the 64bit notepad++.exe, another thing I would try is the following series of experiments using the Windows “Run” dialog: type Win+R (hold down the Windows Key and type R), which should bring up the “Run” dialog. (Or click the windows/start menu, type “run”, and select the “Run: desktop app”, which should also show the “Run” dialog.)

      1. In the “Run” dialog, type "c:\Program Files\Notepad++\notepad++.exe" (with the quotes), then ENTER, and make sure it properly runs the 64bit NPP. Close NPP. – this will tell us whether Windows can actually run the executable from its installed location
      2. Open the “Run” dialog again; this time, "c:\Program Files\Notepad++\notepad++.exe" "c:\Program Files\Notepad++\readme.txt". (Still with the quotes: we need to protect against the spaces in the directory name.) Does it open the NPP readme file? Close NPP. – This will tell us whether it can properly open a file from a command line.
      3. Open the “Run” dialog again. This time, try to open the same file that you tried with the manual OpenWith earlier, using "c:\Program Files\Notepad++\notepad++.exe" "c:\path\to\whatever\file\didn't\open\filename.txt" – maybe there’s something else preventing Notepad++ from opening certain files, but not its own readme.txt.

      Other questions: is it only one or two files, or any file, which refuses to open when you try OpenWith and manually browsing to notepad++.exe? Have you tried a variety of file locations, or are they all in the same approximate location (all in the same \\path\to\network\location? All in your My Documents? All in the same Dropbox folder? Or have you tried a variety of locations on the drive?)

      Finally, if all else fails: is there a reason you cannot use the 32bit Notepad++? Because 32bit NPP will work on a 64bit OS. But if you are trying to edit a huge file, or if you need a plugin that’s only available on the 64bit version, then those would be reasons to only use the 64bit version.

      Nicole MorganN 1 Reply Last reply Reply Quote 3
      • Shamay MotiS
        Shamay Moti
        last edited by

        Hello Peter,
        Step 1: working Okey !! it’s mean i have version 64bit as we expect.
        Step 2: Working okey !! Readme.txt file succeed to open with Notepad++
        Step 3: Working okey !! My file XYZ.txt succeed to open with Notepad++

        My goal is to open the files (TXT , LOG …etc) automatically with notepad++.
        If i try to open *.txt file and click “Right click” on the mouse and choose “open with” i don’t see notepad++ option .
        If I click on “choose another apps” and choose the option: “look for another app on this PC” and go do : “c:\Program Files\Notepad++\notepad++.exe” nothing Happen !! the notepadd++ couldn’t open !

        I also tried to choose from the Notepad++ option “Setting” --> "Preferences --> “File Association” --choose TXT But it did not work either .

        I think there is something wrong with registry due to version 32-bit (x86) was installed before .
        :-(

        1 Reply Last reply Reply Quote 0
        • Per IsaksonP
          Per Isakson
          last edited by

          @Shamay-Moti

          On Win10 the following works for me.

          • open File Explorer
          • right click a file, e.g. temp.log
          • select Properties at the bottom of the list
          • click the Open with: Change button
          • select Notepad++
          1 Reply Last reply Reply Quote 0
          • PeterJonesP
            PeterJones
            last edited by

            I know your goal was the automatic-opening… I was just seeing whether windows could find notepad++.exe at all… it
            can.

            When the explicit Run-dialog versions work, but the manual Open With > Look for Another... does not, even when you point it directly at the 64bit executable. I tend to think that you might have missed one of the registry entries, especially ones where the key (in the left pane) is named notepad++.exe – there might be some data/value pairs under that key (or one of its subkeys) which you missed

            When you searched your registry, did you search for “notepad++” or “notepad++.exe”? Because there are a few entries that might not have the .exe extension.

            I have 32bit installed, not 64bit, so I cannot tell you what a “working 64bit install” looks like. (Some of my favorite plugins are still only 32bit, so I haven’t permanently upgraded to 64bit… though I have a portable version for the rare instances I need the 64bit functionality, like huge files.)

            But in my registry, here are some of the instances of Notepad++ that I could find:

            • HKCR\*\shellex\ContextMenuHandlers, includes ANotepad++64, which includes (Default)={B298D29A-A6ED-11DE-BA8C-A68E55D89593}. But if I go to that handler
              at HKCR\CLSID\{B298D29A-A6ED-11DE-BA8C-A68E55D89593}\InprocServer32, I see (Default)=C:\Program Files (x86)\Notepad++\NppShell_06.dll – so it’s a reference to a DLL, rather than an .exe… maybe you missed that one for conversion from x86 to 64bit.
              • also found in HKLM\SOFTWARE\Classes\*\shellex\ContextMenuHandlers\ANotepad++64 and HKLM\SOFTWARE\Classes\CLSID\{B298D29A-A6ED-11DE-BA8C-A68E55D89593}\InprocServer32 – I believe if you change the first, the HKLM version will automatically update (or vice versa)
              • you may have other CLKID associated with it, as well…
            • You probably found HKCR\Applications\notepad++.exe and all it’s subkeys and data/value pairs
            • I have some instances in HKCR\Local Settings\Software\Microsoft\Windows\Shell\MuiCache, but they all include the notepad++.exe, so you probably found them (and MuiCache just lists recently used applications, which shouldn’t affect anything anyway)
            • HKCR\SystemFileAssociations\... hierarchy has some subkeys with notepad++.exe: ...\text\, ...\txtfile
            • HKCU\Software\Classes\Applications\notepad++.exe\ has a hierarchy you’ll want to check
            • HKCU\Software\Microsoft\Windows\CurrentVersion\ApplicationAssociationToasts mentions with notepad++.exe with some extensions, as do the HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.***\OpenWithList, where .*** matfches the extensions from the Toasts…
            • Skipping some that are HKLM links…
            • HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\notepad++.exe: I didn’t see an App Paths earlier, so I don’t think it’s a link…, though it looks similar to the HKCR\Applications\notepad++.exe…
            • a bunch in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\..., which are for various installers (and thus irrelevant to file associations)
            • some in HKLM\SOFTWARE\Patchlink.com\Discovery Agent\NativeScan\1fdd33bf-f7e2-4ba2-b49c-578375c7c250 … I think that has to do with when you install new versions… and none of them seem to have a path associated
            • there’s also HKLM\SOFTWARE\WOW6432Node\ versions of some of the other HKLM\SOFTWARE instances

            (HKCR = HKEY_CLASSES_ROOT, HKCU = HKEY_CURRENT_USER, HKLM = HKEY_LOCAL_MACHINE. The ones in HKLM are usually linked to equivalents in the HKCR hierarchy)

            I cannot guarantee this didn’t miss some that were important to you… but doing a more detailed search of the registry, like I just showed, is what I would do next, if it were my system having the issue.

            1 Reply Last reply Reply Quote 2
            • Shamay MotiS
              Shamay Moti
              last edited by

              Thanks for טour detailed reply
              there are many oכ registry keys , it’s impossible to go over all of them

              The solution should come from the R&D people of Notepad++ .
              I hear about many similar cases in many people around the world

              R&D need to release Cleaner tool (or patch) in order to clean the registry and rebuild all the keys for the 64Bit software .

              How can we ask the Notepadd++ R&D to request to develop such a tool to solve the problem

              1 Reply Last reply Reply Quote 0
              • PeterJonesP
                PeterJones
                last edited by

                This FAQ explains how to report a bug or request a new feature

                1 Reply Last reply Reply Quote 0
                • Shamay MotiS
                  Shamay Moti
                  last edited by Shamay Moti

                  Thanks, PeterJones
                  Issue solved!

                  I took a Clean VM machine and install from scratch “notepadd++ 64 bit” and took all the keys from the registry and add it to my computer.
                  export & import (I tried with 3rd party software but I didn’t find something good to do this work)

                  There were nearly 50 places I added*
                  keys for example :

                  [HKEY_CLASSES_ROOT\Applications\notepad++.exe]

                  [HKEY_CLASSES_ROOT\Applications\notepad++.exe\shell]

                  [HKEY_CLASSES_ROOT\Applications\notepad++.exe\shell\open]

                  [HKEY_CLASSES_ROOT\Applications\notepad++.exe\shell\open\command]
                  @="“C:\Program Files (x86)\Notepad++\notepad++.exe” “%1"”

                  [HKEY_CLASSES_ROOT\CLSID{B298D29A-A6ED-11DE-BA8C-A68E55D89593}]
                  @=“ANotepad++64”

                  [HKEY_CLASSES_ROOT\CLSID{B298D29A-A6ED-11DE-BA8C-A68E55D89593}\InprocServer32]
                  @=“C:\Program Files (x86)\Notepad++\NppShell_06.dll”
                  “ThreadingModel”=“Apartment”

                  [HKEY_CLASSES_ROOT\CLSID{B298D29A-A6ED-11DE-BA8C-A68E55D89593}\Settings]
                  “Title”=“Edit with &Notepad++”
                  “Path”=“C:\Program Files (x86)\Notepad++\notepad++.exe”
                  “Custom”=“”
                  “ShowIcon”=dword:00000001
                  “Dynamic”=dword:00000001
                  “Maxtext”=dword:00000019

                  [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search\RecentApps{9FD12A0E-AF33-420E-83AE-67861A853883}]
                  “LastAccessedTime”=hex(b):10,4c,68,25,b0,f4,d3,01
                  “AppId”=“{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}\Notepad++\notepad++.exe”
                  “LaunchCount”=dword:00000002
                  “AppPath”=“C:\Program Files (x86)\Notepad++\notepad++.exe”

                  1 Reply Last reply Reply Quote 1
                  • Nicole MorganN
                    Nicole Morgan @PeterJones
                    last edited by

                    @PeterJones I was having this problem too, and I’d thought that I had to use the 64bit NPP with my 64bit OS, so when I read your suggestion I uninstalled the 64bit and installed the 32bit NPP, but I still can’t associate the TXT file type with NPP. I can open individual files in NPP but when I try to make the association nothing happens. Any suggestions?

                    1 Reply Last reply Reply Quote 0
                    • PeterJonesP
                      PeterJones
                      last edited by

                      You most likely still have something wrong in the registry. Unfortunately, uninstalling and re-installing doesn’t always fix the registry issues.

                      Personally, if I have association problems, I just go into the .txt entry, see that it points to txtfile or similar, and go to there, add a new verb, and then set the default verb to that new verb. All the details you need are contained within this thread. (Two notes: First, registry editing is something that is technically taking a risk every time you do it; I have never bricked my PC by doing a registry edit, and have always been able to fix any problem that I introduced… but some people are more worried about such things than I. Second, after most manual registry edits, unless you have a utility that can send the right Windows messages to refresh the environment, you need to at least log out and log back in, and possibly even reboot, to get the registry changes to take effect.)

                      1 Reply Last reply Reply Quote 1
                      • Cody WrightC
                        Cody Wright
                        last edited by

                        I just fixed this on my PC. Here is what I did:

                        1. Browse to the location of Notepad++. Copy the directory. Mine was

                        “C:\Program Files\Notepad++\notepad++.exe”

                        1. Run CMD as administrator.
                        2. Create a new file type to associate with file extensions. This command for me was…

                        ftype nppfile=“C:\Program Files\Notepad++\notepad++.exe” %1

                        1. Associate your file extension with the new file type. The command was…

                        assoc .nfo=nppfile

                        Now when I double-click on .nfo files it opens them in notepad++. Hope it works for you!

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors