Explorer Replacement - links to network folders not opening in Opus

I have reset OPUS as the default for all file handling but whenever I get an email with a link to a network directory/folder, windows used Filemanager to open the link. I have uninstalled and reinstalled OPUS and reset the options to request OPUS to do everything but still no joy.
This does not happen on all computers so must be some override in the registry. How do I force OPUS to open the network folder links.

Are you using the same email client on all machines?

Which email client is it?

What form do the links take in the emails?

We use exchange. It is the same on all machines.
Typically the links are to a directory. In outlook Insert - Link.

Does that create a text link, e.g. a URL, or an attachment?

It displays as text.
P:\scx1703\Engineering\Reports\pdf

That should open the same way as any other path, unless Outlook is doing something different for some paths vs others.

Is P:\ mapped to the same thing on both drives?

What result do you get if you paste the same path into the Start Menu or Win+R run dialog?

I get the same path.
One of the little annoyances of windows however is that if the link is to a document (word or excel for example), the document opens with the explicit path, not the mapped path.
p:\mcx1802\Engineering\Reports\mcx1802-crt-str000-001-a.docx becomes
\haald-prj\projects\mcx1802\Engineering\Reports\mcx1802-crt-str000-001-a.docx

That could be Word doing that. Or it might be Outlook showing one path but actually opening another.

What happens if you paste the UNC path, rather than the drive letter version, into Start?

If I type the path into Run it starts OPUS.

That means Explorer Replacement is handling the path.

It's possible Outlook is explicitly sending the path to File Explorer instead of the default folder handler for some reason.

I and others have experienced similar problems in opening links to folders from electron-based applications (I'm using a markdown nores editor/organizer named notable). I see others reporting same issue at the Elecron repo: shell.openExternal uses wrong application · Issue #26598 · electron/electron · GitHub

The problem (as far as I can understand) seems to be that although the call from electron is to the default file handler (which should call directory opus), electron puts some 'quoting' around the folder/filename which seems to lead DO to not handle the call, and so it falls back to Windows Explorer which opens the folder instead.

It is true that openExternal, under the hood, calls ShellExecute as well, but it manipulates the parameters before it does so.
when you run shell.openExternal('c:') in electron, the api call looks like this (debugged with API Monitor):
ShellExecuteA(NULL, "open", "\"file:///C:/\"", NULL, NULL, SW_SHOWNORMAL);

So it adds file:// to the path and adds quotes around the file name.
From my testing with the native API both of those modifications do change the behavior of ShellExecute.

This is being reported as an electron bug, but may take some time to resolve. Is there anyway DO could be changed to handle the call the way electron is making it? If I'm understanding correctly, the issue is not so much that the call is incorrect (since Windows explorer knows how to handle it), but perhaps that the call is being made in an unusual way that the directory opus API may not be written to handle.

Thanks!

It's not the quoting that's causing the problem.

The problem there is that they are explicitly asking for the "open" verb, which will run Explorer. (From memory, if we changed what that did in the registry, it'd break double-clicking folders within Explorer, or make them open in Opus, which is undesirable. It'd also make turning off Explorer Replacement a lot more error prone, especially on a system with more than one third-party file manager, since the original verb could get lost in multiple renames.)

They should instead set the second argument to NULL, which makes ShellExecute use the default verb. If Explorer Replacement is turned on, we make "openindopus" the default verb, but that shouldn't be used explicitly either. Just set the verb to NULL and let the system take care of it.

Thanks... this is all a bit beyond my comprehension, but I will add this information and a link to this discussion to that Electron bug report. THanks!

1 Like