7

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.

1
  • Maybe pictures will help, a lot of people are struggling to understand what you're trying to do. My FTP application is FileFilla, my html and html application is Firefox. I didn't have an issue setting them to be different. Maybe it's the FTP app you're using that's broken. Try another app.
    – JordanGS
    May 14 '17 at 14:05
3

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\""
1
  • I dont think there should be 3 backslashes between Internet Explorer and iexplore.exe
    – cowlinator
    Feb 22 '19 at 22:21
1

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.

2
  • 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.
    – Dynde
    May 13 '17 at 12:27
  • 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.
    – Biswapriyo
    May 13 '17 at 14:32
0

Go to Settings > Apps > Default Apps > Scroll down and click on Select defaults by app

Then just find your desired browser from the left.

2
  • 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
    May 13 '17 at 12:25
  • 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
    Feb 22 '19 at 22:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.