How can I associate html/htm files with Chrome in Windows 7 64 bit?

06
2013-12
  • matt

    I want Chrome to open all .html files. It is currently set as my default browser, however html files open in IE9. When I go to Control Panel\Programs\Default Programs\Set Associations I see that .html and .htm files are associated with IE. When I choose to change the default program it I'm presented with a list of programs but Chrome is not one of them. I browse to, and then select the Chrome.exe (C:\Users\Matt\AppData\Local\Google\Chrome\Application\chrome.exe) but it goes right back to IE. This is the first time I've seen anything like this. I'm running Windows 7 64 bit. I never had this problem on Windows 7 32 bit.

    Is this because Chrome by default installs in the User directory, not the Program Files directory?

    How can I fix these file associations?

    EDIT: It's not that things are reverting back to IE after associating them with Chrome. When I browse to Chrome in the file association window, and select it, it doesn't seem to take. It doesn't show Chrome in the list of programs despite pointing to the Chrome.exe location. I really think this has something to do with the fact that it doesn't install into the Program File Directory.

  • Answers
  • Synetech

    Some of the settings may have changed after you installed Chrome and set it as the default browser (for example, some other program may have registered itself as the handler for HTML files).

    Unfortunately, Chrome’s make default browser function is disabled because it thinks it already is the default browser because it only checks one or two of the various relate settings.

    You can work around this by using another browser’s make default browser function, followed by Chrome’s make default browser function. That should allow Chrome to re-register itself as the handler for .htm* files.

    You can do it with IE since it comes with Windows, but you have Firefox, so you can use that.

  • Nick Josevski

    If the standard

    Right click on file

    Open With > Choose default program...

    Select Chrome

    Doesn't work, try:

    • To recreate the issue with with either Firefox or Opera.
      • This may then help move the default opening file from Firefox/Opera to Chrome
    • Do a restore defaults in IE
      • Internet Options > Advanced > 'Reset Internet Explorer Settings' > Reset...
      • This may help bring IE back to a state where it won't interfere with your changed associations
    • Re install Chrome
      • Worth a try (possibly try switching from main version to beta version, or vice versa)
    • Try this as another user on your system (create a new user if need be)
      • Sometimes Chrome user settings get corrupted.
  • Nicole Hamilton

    From within Chrome, click on the wrench icon next to the address bar, then select "Settings". You should see an option for making Chrome your default browser.

  • WHOIS Lookup

    Looks like IE is registered for the Open verb for this file type in your system. Either change your system associations or setup a custom association in the settings of FileZilla.


  • Related Question

    What program do you use to edit file associations in Vista and Windows 7?
  • Andrew Moore

    We all know that Vista and Windows 7 doesn't let you specify custom extensions or customize them to your liking. What program do you use to edit file associations in Vista and Windows 7?

    EDIT:


    Just to be more clear, I'm looking for a program which lets you:

    • Create new extensions (I am aware of the Open With > Set As Default).
    • Customize the Icon
    • Customize the file type name
    • Allows the creation of custom actions
    • Repair any non-working extensions

    Presently, the Windows Vista/7 extension manager doesn't let you do any of those actions.


  • Related Answers
  • 8088

    Default Programs Editor was created for this purpose! From the site:

    File Type Settings:

    • Add, Edit, and Delete context menu items
    • Edit file type information (such as icon and description)
    • Change an extension's associated file type

    It also does Autoplay handler editing, and Default Programs editing. And it installs as a Control Panel applet, which makes it discoverable from Windows Search, so you can forget about it until you need it.

    Also, it doesn't require administrative privileges for most operations (but it is UAC compatible).

    Default Programs Editor Screenshot

    (In the interest of full disclosure, I wrote this program!)

  • 8088

    FileTypesMan from NirSoft fulfills all your requirements.

    enter image description here

  • heavyd

    Windows 7 does let you customize the extensions.

    1. Click the start button
    2. Search for the "Change the file type associated with a file extension"
    3. Customize the existing extension using the dialog presented.

    Although this dialog doesn't let you add new ones, you can easily create a new one by:

    1. Create a new file on the desktop with the desired extension
    2. Double-click the file
    3. Select a program from a list
    4. Choose the program you want associate it with and make sure to check "Always use the selected program to open this kind of file"
  • Ryan Bolger

    All file extension association information is stored in the registry. And if you do a little browsing, it's not terribly difficult to figure out how things work. For machine-wide associations, it all happens in the root of HKEY_CLASSES_ROOT. Manual editing of this stuff gives you ultimate power over your file extensions (albeit tedious). Just create a backup in case you screw things up and want to revert.

    Each file association has a subkey called .xyz where xyz is the extension of your file. The (Default) value for that key is set to some arbitrary string. Most applications that register file extensions set it to something human readable. For example, .pdf on my system is set to FoxitReader.Document. There many be other values in this key, but nothing is mandatory except the (Default) value.

    For whatever that (Default) value is set to, there will be a corresponding subkey with the same name also in the root of HKEY_CLASSES_ROOT. The (Default) value of this key is essentially the "friendly name" of the file type. This key may also have many subkeys, but the only ones we're interested in are DefaultIcon and Shell.

    DefaultIcon as you probably guessed controls the icon for that file type. The (Default) value for this key should be set to the path of the icon file. Or if the icon is in a .exe file, set it to the path of the .exe and include a comma and the icon index at the end of the path. For instance, the FoxitReader.Document DefaultIcon is set to

    C:\PROGRA~1\FOXITS~1\FOXITR~1\FOXITR~1.EXE,1
    

    Shell is where you set up all of the "actions" for this file type. For each action you want to define, create a subkey called whatever you want to name the action. Most types have at least one action called open. Within this new action's subkey, create a subkey called Command. The (Default) value of this Command key is basically the command line that runs when this action is clicked/run. For example, the open command on a FoxitReader.Document is

    "C:\PROGRA~1\FOXITS~1\FOXITR~1\FOXITR~1.EXE" "%1"
    

    The "%1" argument gets set to the path of the file you ran the action from.

    If you've only got one action defined for a given file type, I believe it will be the default action that is run if the file is double clicked. If there are multiple possible actions, you can set which one will be the default by modifying the (Default) value of the Shell key. Just set it to the name of the action you want to be the default.

    With all of this said, it's not very efficient to do it all from scratch. It's probably easier to use the built-in tools to get most of the way there and then just tweak the things manually that the tools don't let you do. I should also probably mention that all of this info is based on XP, but I'm almost positive none of it has changed for Vista or Win7.

  • Eran

    Vista allows you to change existing associations, and I'd imagine it's similar if not the same in Win7. Control Panel > Default Programs > File Associations.

    Edit: Here's an article with some more advance tools that might suit you.

    I would choose the first tool featured (Creative Element). It's a freeware and a lightweight program, it does all you want in a simple way (and more, since file associations management is just one of the tools in that pack).