How do I stop Notepad++ taking back file associations?

5,428

Solution 1

Go to Settings -> Preferences and remove any Registered exts:

enter image description here

Solution 2

Open Notepad++ as "Administrator" or "root" then remove the extensions associated with it. After removing Windows will ask how to open this file choose another application.

Share:
5,428

Related videos on Youtube

Svend Hansen
Author by

Svend Hansen

Danish software engineer and games programmer.

Updated on September 18, 2022

Comments

  • Svend Hansen
    Svend Hansen over 1 year

    I've been using Notepad++ in Windows for some time, and while I think it's a good editor, I decided to go back to Emacs to try to learn to make the most of it (writing some elisp and such).

    As I do like Notepad++ I don't want to uninstall it, but I'm failing to get notepad++ to stop taking back file associations for certain file types like .txt and .xml.

    If I right-click on the file, choose "open with > Choose default program..." and set it to the emacs windows client, I can see the icon flicker shortly, as if it changes, but then immediately changes back again.

    I've disabled all file associations from the Notepad++ settings, so the "Registered Exts:" list is completely empty.

    Does anyone know if there is something else I can do to stop it taking back the file associations?

    (just thinking: is it possible that I need to reboot after disabling the associations?)

    EDIT:

    Thank you all for your help.
    Unfortunately, I haven't had much time to use at figuring out what's causing this. So I installed Notepad++. Strangely enough, this wasn't what was doing it, and when I now try to associate it with Emacs, it does the same flickering thing, and next time I do a normal "Open" it asks me what to open the file with (so, while it's not bound to Notepad++ any more, it still doesn't allow me to rebind it to Emacs. As a test I've done the same with the normal MS Notepad, and it also doesn't allow me to rebind to that... so, it seems it's neither a Notepad++ or Emacs issue, but something else (Windows itself?) stopping me rebinding the files.

    I just tried going through Control Panel > Default Programs > Set Associations and it currently says:

    Name            Description                           Current Default
    .txt            TXT File                              Unknown application
    

    I've tried changing it from here (through Change program...) and that doesn't change anything. It still says "Unknown application" and it still opens with the "Open with" window.

    As a side note, should I rename my question, now that it seems to be unrelated to Notepad++?

    EDIT 2:

    I just tried changing the association of file that was never associated with Notepad++ (.css associated with Notepad2), and that has the same (lack of) effect. Just to cement that this is definitely not a Notepad++ related issue.

    • Oliver Salzburg
      Oliver Salzburg about 11 years
      Does this happen while Notepad++ is running?
    • Svend Hansen
      Svend Hansen about 11 years
      It happens whether Notepad++ is running or not. I can't find any "notepad++ agent" type processes in the task manager that might be doing something like this...
    • Oliver Salzburg
      Oliver Salzburg about 11 years
      That's what's confusing me. There should be something that is doing the change. You could try to run Process Monitor and change the association once more, then you should be able to see the access to the corresponding registry key in Process Monitor. If another application changes it back, it should be in the log as well. That could be helpful in finding the source.
    • Svend Hansen
      Svend Hansen about 11 years
      +1: This does definitely seem to be a good idea, the only problem is that I find it hard to read the Process Monitor, with all the things I've got running. Might have to wait until the end of the day and try to shut everything off to make the log more quiet ;)
    • Oliver Salzburg
      Oliver Salzburg about 11 years
      Yeah, there will be a lot going on in the log. You're going to want to search for part of the registry key that is being changed (possibly HKEY_CLASSES_ROOT\.txt). Once you find the right log entry, you can easily create a filter (right-click, Include...) for other accesses to that key.
    • Oliver Salzburg
      Oliver Salzburg about 11 years
      The context menu is aware of the column at which you opened it. Ultimately, you'd want to filter a Path. The Operation would be (at least) RegOpenKey. Join us in Root Access if you want to work out the details.
  • Admin
    Admin about 11 years
    He stated in the question that he's already done this.
  • Svend Hansen
    Svend Hansen about 11 years
    I've already done this... though I haven't rebooted since (have a lot of things running)