Community
    • Login

    File type associations not working

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 2 Posters 32 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.
    • A
      as232
      last edited by as232

      I’ve used NPP for years and recently installed 8.9.1 on a new Win11 system. It appears that the File Association configuration under Setting does not take –

      NPP Settting

      Windows File Association

      Edit: Apparently the “Image Link” and “Link” buttons in the editor totally mangle the URL and prepend some other site that doesn’t work. Not sure how else to post a link to these screenshots as I have to have more Rep to do so, but can’t get Rep without posting. Chicken and egg, go figure.

      PeterJonesP 2 Replies Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @as232
        last edited by

        @as232 said in File type associations not working:

        Edit: Apparently the “Image Link” and “Link” buttons in the editor totally mangle the URL and prepend some other site that doesn’t work. Not sure how else to post a link to these screenshots as I have to have more Rep to do so, but can’t get Rep without posting. Chicken and egg, go figure.

        It’s only sites like google drive, which don’t link to the actual image, but to their wrapper page around the image (including the viewer needing to be logged into Google, and have to fill out a form to ask you for permission to view the file), which don’t work.

        You literally just paste the image into your post – don’t bother with an external host. If the image is in your windows clipboard, just paste it. If the image is a file, copy the file from Windows Explorer, then paste in your posting here, and it will upload the file for you. You don’t need any reputation to do so.

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

          @as232 said in File type associations not working:

          I’ve used NPP for years and recently installed 8.9.1 on a new Win11 system. It appears that the File Association configuration under Setting does not take

          Windows has been trying to distance itself from the original “file association” technology for decades. They keep on making it harder and harder for the end user to implement something via that old technology. Through that preference section, Notepad++ tries its best to convince Windows to do things the old ways, but it needs to be running As Admin for it to even try, and it’s at the mercy of the OS as to whether the OS will propagate such settings to the user, or completely bypass them.

          Fortunately, you don’t need to use Notepad++'s “File Association” preferences to get file types associated with Notepad++, or to open them with Notepad++.

          If you did a normal installation of Notepad++, it will add an Edit with Notepad++ entry to the main right-click file menu (by registering the NppShell DLL when you install Notepad++), so you can open any file you want with Notepad++ by using that right-click entry.

          Further, if you want a file’s type to permanently default to Notepad++ (so double-click launches Notepad++ on that file), you just have to go to the Right Click menu’s Open With, and if Notepad++ isn’t already listed in that sub-menu, then Choose Another App and choose it there, clicking Always to make it stick; if it’s not even there, then click Choose an App on your PC and browse to c:\Program Files\Notepad++\notepad++.exe or your installation’s equivalent.

          If this doesn’t help you, then you’ll have to figure out how to copy/paste the image into your post (you can even drag and drop the image from your Explorer window into the post-editing panel while you are replying here, so you don’t even have to copy/paste, if you don’t want to), so that we can see what is uniquely happening for you.

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

            @PeterJones said in File type associations not working:

            it’s at the mercy of the OS as to whether the OS will propagate such settings to the user, or completely bypass them

            It worked reasonably for me. I ran my installed Notepad++ v8.9.1 As Administrator, then went to the File Association setting, picked customize, typed .pcj (which is a file extension that didn’t have any associated app or filetype), then clicked -> to move it to the Registered extensions column. If I then exit Notepad++ (to get out of Admin mode), and double-click on blah.pcj in Windows Explorer, it opened it in Notepad++. (And looking at the registry, I can confirm it added HKCR\.pcj to point to Notepad++_file, and HKCR\Notepad++_file sets the shell\open\command as expected. (But maybe you didn’t think it “worked” at this point, because it doesn’t necessarily change the text of the “file type” column in Explorer. Even if it doesn’t, the double-click did what I expected.)

            When I tried with the preferences dialog misc > .nfo, it edited the existing HJCR\.nfo to point to Notepad++_file (with a Notepad++_backup entry pointing to the original MSInfoFile. When i double-click on an NFO file, Windows actually pops up a Select an App to open this .nfo file, which includes the “Notepad++ (New)” entry (because Windows has been trained to not fully allow applications to hijack extensions, because users hate it when an app does that without their permission) – and from there, you can choose whether you really want to.

            But by doing it through the Windows OS Open With interface to begin with, you make sure Windows knows it’s you who wants the change, not the app, and so lets you do it more easily there.

            IOW: it works for me on Windows 11 as Notepad++ tries it, with the caveats that Windows 11 is trying to protect me from nefarious apps, so might require a confirmation; and when I do things the way Windows OS wants, it works as expected rather than having to do the extra steps.

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