File Association gave me more than I bargained for
So in my job there are two new types of text files that I deal with often; with two corresponding extensions.
I’m not typically one to do this (certainly have NOT done it for .txt files or any other) but I ran Notepad++ in Administrator mode, went to the
File Associationsarea in the Preferences and "customize"d my two extensions so that they appeared in the
I restarted Notepad++ in non-admin mode and went back to look at my registered extensions and I was surprised to see 10 extensions there, of which my 2 were indeed present. But what gives with the extra (and unwanted) 8 ?
Well, if I run as Administrator again, go back in and look, only the 2 new extensions that I wanted are listed in “registered extensions”.
Maybe I have some misunderstanding of this feature, but I thought you had to run in Admin mode to configure this. Perhaps not.
It still doesn’t seem to explain why, for my non-Admin mode running of Notepad++, that I went from 0 registered extensions, to 10…
Back in non-Admin mode, I attempted to remove the undesired 8 extensions from the “Registered extensions”. They appeared to be removed just fine but on my next restart of Notepad++ I checked and they were back again.
So I’m flummoxed as to what to do next.
AND…I’d really like to know the proper way of doing what I tried and failed to do (simply add two extensions as “registered”).
Of course now I realize (you can tell I don’t do – and don’t want to do – this kind of thing often…) that simply staying “outside” of Notepad++ and doing the following was probably the better idea, answering properly to this after double-clicking a new extension type:
But of course now I realize I really don’t want these file associations at all, and I’m wondering the best way to undo the weird changes done to my registry from what I attempted inside of Notepad++.
I’m wondering the best way to undo the weird changes done to my registry
If you had used a registry-watcher utility to see exactly what changes Notepad++ made, it would be easy.
In the “good old days” of Windows, where they always used
HKCR(or, technically, it’s been using that as an alias to the appropriate sections of
HKCU\Software\Classesfor user-specific associations and
HKLM\Software\Classesfor system-level associations), I would have just gone through the
.extentries, and looked up their
FileTypeentries, and modified or deleted those shell commands. However, the “always use this app to open” settings in modern Windows will sometimes use different or convoluted registry entries, and I don’t always know where to look for those. That’s why when I am playing with associations, I prefer to just use the registry directly, and avoid both in-app and windows-gui association manipulations. Unfortunately, MS is fighting harder against that, and I’ve started to see sometimes where MS resets the app that gets used, even though my
HK**\Software\Classessettings have remained unchanged; I’m still trying to figure out exactly how MS does the modern “default app” settings.
Or, the TL;DR version: good luck with that. :-)
I had a flash, and found my document where I’ve taken notes on such things. I’ll post the relevant section in case it’s helpful:
- I recently learned
HKCRhad actually been obsoleted a decade ago (I forget if it was Win95 or WinXP)
- I recently learned
- see Customized Context Menu (not included)
(Default)= Text Version of Name of Association (shown in Explorer)
nameOfVerb(sets the default verb to run for double-click)
(Default)= Human Readable Verb
path\to\exe "%1" %*
- make it
REG_EXPAND_SZif you want path to include
- make it
RClick > “Open With” > Use as Default end up here:
- reference: https://stackoverflow.com/a/3924822/5508606
- If you want to go back to the system default, delete