Tuesday, October 11, 2011

File & Protocol Disassociation

Ever wanted to disassociate (i.e. delete an association) a "Default Program" from a file or protocol but didn't know how? Unfortunately Windows 7 hasn't exactly made this process very user friendly as the solution required diving into the registry.

Warning: It's always a good idea to backup your registry before deleting things from it. Simply right click the folder icon and choose "Export" to backup everything that is a child of that node. Or choose it from the "File" menu to backup the entire registry (~200+ MB, so not recommended :P ). Deleting things from the registry if you don't know what you're doing can make your computer unable to boot into Windows.
For 1337 users: If you're confident in your skills, in Windows Registry just go to the path mentioned in the following paragraph, and delete the "String" value for the association you wish to eliminate.

Enough of that, let's continue. Here's what I have. I've accidentally selected Chrome as my default program for my "mailto" protocol. All "FileAssociations" and "URLAssociations" are stored in the following path in your registry: "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Clients\
<ClientName>\<AppName>\Capabilities\<FileAssociations | URLAssociations>"
-- "FileAssociations" folder contains file extension (or file type) associations.
-- "URLAssociations" folder contains protocol associations.

Notice the correlation in the screenshots below between the protocols belonging to Chrome and the "String" Value items in the URLAssociations list within the registry:



Notice that I still have my "mailto" association. Now I'll walk you through the steps of deleting it. You don't actually need to open Default Programs, but you can to confirm if you like. To do so, click Start -> Control Panels -> Default Programs -> "Associate a file type or protocol with a program."

The place to delete this association is in the registry at the above mentioned path (note the path in the footer of the Registry Editor window). Open the Registry Editor by clicking Start, then typing "regedit" in the search bar and hitting enter. Next navigate to the path show and delete the "String" value with the name of the protocol or file extension you wish you delete. In this case, I'm deleting my "mailto" protocol association, so I'll be looking in the "URLAssociations" folder as mentioned above. Now let's delete that booger...




Notice that the "mailto" protocol is no longer listed. We've successfully deleted the assocation. No restart required :)