Hey guys- I've read through the above posts, and have a quick question about the "Unassociate.exe" utility. What exactly happens when I click "Remove file association (user)?"

I created a file via Python that I then opened with notepad, which for some reason changed the suffix of the file (from "check.html.summary" to "check.html"). I needed the file name to remain "check.html.summary" so I thought that if I selected the ".txt" extention from the list in unassociate.exe menu (since notepad docs operate under ".txt") and clicked "remove file association (user)" that this would dispel the association of the original "check.html.summary" with ".txt".

Well, it did not. I found another solution to my problem (apparently, when I created the ".summary" ending via Python, it created a new type of ending called ".summary" (if I open that file with notepad, or, presumably, another program)); deleting that from the list in unassociate.exe got me back to where I wanted, and this time I won't be selecting "open with notepad" for my "check.html.summary" file. (The way I solved it was just to delete the ".summary" ending via unassociate.exe; apparently, simply creating a file called "check.html.summary" via Python does NOT create a new file extension called ".summary"- I checked it in the unassociate.exe list; BUT, if I OPEN THAT file, i.e., the "check.html.summary" file, WITH notepad, as I did, not only does it create a ".summary" extension in the unassociate.exe list, which I subsequently deleted, but it also changes the file name from "check.html.summary" to "check.html," which is not what I wanted. I don't understand the inner workings of Windows to be able to comprehend why this happens, but that is not my central question anyways).

But my question still remains: what happened when I selected ".txt" from the unassociate.exe menu and clicked "Remove file association (user)"? Did this somehow damage the way I can save/create .txt files, or did it change how Windows treats .txt files? What did it do? I just am not getting what "remove file association (user)" means- remove file association from where? From what? Since selecting ".txt" and clicking "Remove file association (user)" was NOT what I needed to do, is there a way to reverse this, or is it not necessary to reverse since it really didn't do anything? Help!!!

I'll try my best to answer your questions, but they may be above my level.

File type associations are stored in the registry, there are various places in the registry which are just shortcuts to other places which make it a whole lot more confusing for me to explain to you! I'll leave these shortcuts for now and I might touch on them later if necessary.

Right, judging by the name of the button "Remove file association (user)", we know it's a user specific setting. The registry is made up of several different hives, often abbreviated to HKCR, HKCU, HKLM, HKU and HKCC (as a Python programmer, I assume you know what they are - LMK if you don't though and I'll be happy to explain). All of those hives are common between different users, except for one - HKCU (HKEY_CURRENT_USER). This is where user specific settings are stored - display settings, themes, program settings etc. etc. This is therefore the hive we want as the association in question is a user specific association. If it was a global association then it would be under HKLM.

If you navigate to the following key with regedit:

[HKEY_CURRENT_USER\Software\Classes]

You will see a lot of subkeys, all named with the various file associations you have. I'm not 100% sure on what this Unassociate.exe tool does exactly, but I would guess that it deletes the key for the extension that you are wanting to remove - which would remove all reference to it in the registry.

Referring back to the aforementioned registry shortcuts, you will see another registry hive called HKEY_CLASSES_ROOT (HKCR). In this, there are a lot more subkeys, also named with file extensions. This hive is a shortcut to the following keys:

The thing is that I am not sure if I have a problem or not at the moment. I was looking for someone that is well-versed in the unassociate.exe utility because I am unsure what the command "Remove file assoication(user)" does; there is also another command called "Delete file type"; I clicked the former, not the latter, so I do not believe that I've actually "deleted" anything (i.e., I don't think I've deleted the ".txt" extension- it still appears in the unassociate.exe list).

Your response was, however, pretty helpful in giving me an overview of how the registry is organized; although I do program with Python, I am still a relative beginner, so I do not really know exactly how the inner workings of the registry function or relate to one another, but from what you've stated, I can reason that there are a set of standard settings that apply for all users, and then there are the user specific settings, which, obviously, apply to specific users.

Since the command I clicked was called "Remove file association(USER)", I believe this only affected the user who was logged in at the time (which is me, the admin), but I don't know what it DID. That is my dilemma; therefore, I do not know if I need to do a system restore to a previous point or not- it may be necessary or it may not be. I will not know until I understand what that command does; so far, my computer is functioning exactly the same as before this, so I have no reason to suspect something is awry.

Thanks again for your help; I will look up a tutorial on the registry to better understand the hive organization.

The "Unassociate File Types" program removes the selected file extension's association for what program opens it with by default for all users on the computer if you use "Delete file type". Using "Remove file association (User)" only affects the current user running the program.

When the association is removed from a file extension, the file extension no longer has a default program set to open it with when you try to open the file. If you want to associate the file extension to have a default program again, then you can always use Default Programs or Open with to associate with a program to open it with by default.

Hi Brink! Thanks for getting to my posts so quickly. Ok, let me see if I understand you correctly:

When I selected ".txt" and clicked "Remove file association(user)", this signified that any files ending in ".txt" no longer are automatically associated with the program "Notepad", meaning that such files will be not be opened with Notepad? But I don't understand this because my files ending in ".txt" still say they "Open with: Notepad" (when I click properties on a '.txt.' file). So I'm not sure I understand exactly what the command "Remove file association(user)" did.

That being said, if my '.txt' files still open with Notepad, then what reason do I have to "reassociate" them with being opened with "Notepad", given that they still open WITH Notepad? I would completely understand if selecting ".txt" and clicking "Remove file association(user)" made .txt. files NOT be opened with Notepad, but they are still being opened with Notepad, so I don't understand how I can "reassociate" the ".txt" file with whatever I UNASSOCIATED it from.

Which brings me to my ultimate question: How do undo what I did? That is, how do I undo selecting ".txt" and clicking "Remove file association (user)"? Given that .txt files still open with Notepad, I still don't understand what that command actually DID. Did it change something in the registry that manages file types that I have to go into to undo to get my system BACK to the way it was BEFORE I executed the command from the unassociate.exe utility?

I'm sorry about the dense reply, but I am a bit paranoid about my computer, and I really do not understand what this command did or how to UNDO it. Thanks again for your help.

It's nothing to worry about since your .txt files still open with Notepad. "Remove file association(user)" just deletes the user defined association for the registry location below leaving you with the default association (ex: Notepad) unless it was changed for all users instead of just current user.

Ok, thanks Brink. Everything with .txt appears to be normal- I checked the registry path you provided, and I also checked the same registry path on a "Guest" account, to see if they differ (albeit I had to access those parts of the registry in the Guest account as an admin). Both paths in my user account (Owner) and the other (Guest) were identical. I guess everything is ok, but does that mean "Remove file association (user)" didn't really do anything?

When I run unassociate.exe again and select ".txt", the "Remove file association (user)" is NOT grayed out (i.e., I can click it), which is weird, since I already clicked it earlier today, so it should be grayed out, right?

Anyways, I guess things are fine for now, though I still don't really get what this program does lol.

When "Remove file association (user)" is not grayed out, then it means that another program is set to open the selected file extension (type) with by the current user instead of the normal default program. When you click on "Remove file association (user)" is removes the user specific association set and restores the default program to open it with instead.

Go ahead and click on "Delete File Type" with .yml selected to see if that may help.

If not, then I attached a .reg file that you can download and merge, if you like, that will delete the .yml file extension from your registry to unassociate it. Afterwards, restart the computer to apply.

Attachments

this worked perfect for me, thank you to whoever posted this. I was on chat with Microsoft support for about hour, should have known. I'm going to let them know this is perfect, it did exactly what I needed, un-associated a file. Someone obviously knows their dos or shell commands very well, awesome!!!!