Default app for a bunch of URL Protocols controlled by .htm default app?

25,120

Solution 1

The following registry key seems to control the URL associations:

HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations

Each subkey of UrlAssociations contains a key named "[protocolname]\UserChoice". The registry setting named ProgId seems to point to a class root registry key like ftp/http/https/etc.

At my system, on which I have Google Chrome installed, the registry value is by default configured as follows:

[...\UrlAssociations\ftp\UserChoice]
"ProgId"="ChromeHTML"

To make sure Internet Explorer is started when executing the following command:

start "" "ftp://localhost"

The ProgId registry value has to be changed as such:

[...\UrlAssociations\ftp\UserChoice]
"ProgId"="ftp"

And the default value of the registry key ftp\shell\open\command:

[HKEY_CLASSES_ROOT\ftp\shell\open\command]
@="\"C:\\Program Files\\Internet Explorer\\\iexplore.exe\" \"%1\""

Solution 2

You can change protocol association in Control Panel > All Control Panel Items > Default Programs > Set Associations. Protocol Associations To find the registry go to this path:: For FTP--

[HKEY_CLASSES_ROOT\ftp] & [HKEY_CLASSES_ROOT\PROTOCOLS\Handler\ftp]

there is also HTTP and HTTPs registry key in that path.

Share:
25,120

Related videos on Youtube

Dynde
Author by

Dynde

Updated on September 18, 2022

Comments

  • Dynde
    Dynde almost 2 years

    I was trying to setup my PC to open FTP and File urls in IE and everything else browser-related (http/https/html etc) in Chrome.

    I've hit a snag - after manipulating just about every single registry key I can find relating to default apps.

    From what I can tell, the app that is handling ".htm" file type opens ALL the other types and protocols as well - regardless of their default app settings!

    Is this by design? Are you not allowed to have different apps open different protocols/file types? If so, what's the point of the default apps system?

    Can anyone shed some light on this?

    Edit: I guess I should have been more specific. Of course I know about default app settings in the control panel. This, however, is exactly my point. Set the default app for the FTP/File/Any URL Protocol and it will be overriden by the app set to handle "htm" files (not html, just htm). This is also how the default "browser" app is being set by windows. It auto-sets the browser app to be the htm app.

    Update

    It appears I was misled by the mechanism I was testing. A URL/Hyperlink field with a button in Dynamics Ax to be specific.

    Putting file:// or UNC-paths, FTP/HTTP/HTTPS ALL open with the app that handles htm (or default web browser).

    After testing with the command prompt as per @treintje's suggestion, the different filetypes and protocols open with the correct apps. I have a suspicion Dynamics Ax use a call to urlmon.dll or something similar on some level to 'intercept' all protocols and filetypes to ensure the default web browser handles the link.

  • Dynde
    Dynde about 7 years
    I apologize for not being more specific, however I would think it was obvious that I'm not trying to set a specific browser app, but different specific apps for specific protocols (such as one app to open html files, another to open FTP or File URL protocols, etc)
  • Dynde
    Dynde about 7 years
    I have tried these settings, both registry and control panel. The "htm" app overrides ALL of the other apps and protocol handlers. Ie. set FTP/HTTP/HTTPS app to chrome, and htm to IE and everything opens in IE.
  • Biswapriyo
    Biswapriyo about 7 years
    An idea popup. Set default browser Chrome. Make a new file type for IE with ftype command. And associate .HTM and .HTML to that file type with assoc command.
  • cowlinator
    cowlinator over 5 years
    I think you meant "Select defaults by protocol"... which does work, if the protocol happens to already be in the window's predefined list of protocols, and the app you want to associate is already in window's predefined list of apps... Actually, it's kind of trash.
  • cowlinator
    cowlinator over 5 years
    I dont think there should be 3 backslashes between Internet Explorer and iexplore.exe