Where in the registry does Windows store with which program to open certain file types?

35,582

Solution 1

The open with associations are all stored in HKEY_CLASSES_ROOT.

This is a special registry hive that combines the local user's associations in HKEY_CURRENT_USER\Software\Classes with the system's associations in HKEY_LOCAL_MACHINE\Software\Classes.

Here's a shot from my registry for the PDF association you mention in your question:

PDF file association in the registry

Solution 2

Just to extend Gareth's answer:

From playing with the registry it looks like

  • entries from HKEY_CURRENT_USER\Software\Classes override entries from HKEY_LOCAL_MACHINE\Software\Classes in the HKEY_CLASSES_ROOT\Software\Classes
  • setting file's extention association from command line using assoc command acts upon HKEY_LOCAL_MACHINE\Software\Classes
  • setting file type association from command line using ftype command acts upon HKEY_LOCAL_MACHINE\Software\Classes

Solution 3

While the answers are (probably, I didn't check) correct, the sane way to modify file associations is with the GUI Microsoft designed for it. (That is, if you are a user and not a setup developer.)

Here is one tutorial with nice pictures, I found it with google: http://www.digitalcitizen.life/how-associate-file-type-or-protocol-program

But you can just open start (win7 menu or win8 screen, doesn't matter) and type file association, enter and it should open the correct control panel link. (Control Panel\Programs\Default Programs\Set Associations).

Share:
35,582

Related videos on Youtube

Robin
Author by

Robin

Updated on September 18, 2022

Comments

  • Robin
    Robin over 1 year

    After installing Adobe PDF reader, it opens files with the .PDF file extension. Ones' default web browser opens .html files and notepad opens .txt files, etc.

    Where exactly in the registry are these filetype - program associations stored in the registry?

    In other words, how does Windows know with which software/program it must open a certain file(type)?

  • Ralf
    Ralf over 4 years
    Maybe that worked once upon a time. Now all Win10 gives me is "Look for an app in the Microsoft Store". BS.
  • Brandon Hawbaker
    Brandon Hawbaker about 3 years
    You're not seeking to understand the intent of the question. He asked: "In other words, how does Windows know with which software/program it must open a certain file(type)?" He's obviously looking at understanding how Windows associates file types. This answer addresses a common Windows problem that people run into trying to control program associations when Windows stops them from doing so. The exact registry path was already provided in a different answer. If the answer above doesn't work for somebody in the same situation, this answer will be much easier.
  • Brandon Hawbaker
    Brandon Hawbaker about 3 years
    Where is it only referencing Windows 7? I see "Windows 7", "Windows XP" and "Windows" generally tagged?
  • Dallas
    Dallas over 2 years
    The start of the solution section on this page (support.citrix.com/article/CTX115676) succinctly backs this up and shows how the assoc and ftype CMDs can be useful when looking at what specific file extension associations are, without needing regedit.
  • Admin
    Admin almost 2 years
    Works for me now on Windows 11