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

browserfile associationwindowswindows 10windows-registry

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.

Best Answer

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\""
Related Question