Linking problem/bug?

Hi, seems I have found a weird bug in DOpus:

  1. Take a internet shourtcut file (.url), e.g. "My Website.url".

  2. Now, inside a DOpus Lister, create a Windows shortcut (.lnk) from the "My Website.url" file.

  3. Double-click the created Windows shortcut file: You think it should open the website in your default browser? No! Instead an error message is displayed which says:
    "The target "" of the internet shortcut is invalid. Open the Properties dialog of the internet shortcut and make sure the indication of the target is correct."

  4. Now comes the weird part: Open the same folder where the Windows shortcut is located in Windows Explorer. Double-click the Windows shortcut which now magically opens the website in the browser!!!!!

Resume: It seems that DOpus does not handle correctly Windows shortcuts (.lnk) pointing to internet shortcut files (.url). Could anyone confirm this?

OS: Windows Vista SP2
DOpus: 9.1.3.0.3449.x86 (11.06.2009 13:14:19)

I can't reproduce that.

Works fine with both Firefox 3.5 and IE 8 as the default browser.

I'm also using Vista SP2 (32-bit) and Opus 9.1.3.0.

Are there any non-English characters in the URL or shortcut name? I've seen older versions of IE (IE5 or IE6 as I remember) have trouble opening such URL files in some situations, though the problem seems not to affect newer versions.

I can reproduce it as many times as I want, under different circumstances.

The problem isn't the browser. The error message comes from Windows (rundll32.exe): Tested with WinSpy++.

The command line of the error message is (from Sysinternals Process Explorer):

No, see this screen-shot, the file is in directory C:\test:

Again: Double-clicking the internet shortcut "DOpus Resource Centre Index.URL" opens the website in the default browser (Firfox 3.5). But when double-clicking "DOpus Resource Centre Index.lnk" the error message is displayed!

Here are the two files in Windows Explorer:

Again, when I double-click the shortcut file in Windows Explorer it opens in the browser without problems!

When I do the same thing the rundll32.exe process is run with the same arguments, except it is passed the .url file rather than the .lnk file.

Could you open a command prompt in that folder and do a dir to confirm the exact filenames? .lnk and/or .url extensions are usually hidden and it's possible you've got a .lnk.url file instead or something strange.

Also, if you edit your .lnk file type (Settings -> File Types), is there anything defined for its Open action or for its Left Double-Click event? They should both be undefined normally.

You mean like this?

Here it is. There seems to be nothing strange:

No, they are undefined:

Could it have something to do with the difference between shortcuts and symbolic links in Vista? But you have also tested it in Vista SP2.
And the shortcut was created manually and normally with Drag'n'Drop.

I've done further research on Windows shortcuts to some other file types, with very strange results:

1. Do work in both DOpus and Windows Explorer (Shortcut .lnk when double-clicked opens in associated program):

INI, BMP, JPG, TXT, GIF, FLV, HTML, Directories

2. DO NOT not work in DOpus and DO work in Windows Explorer (Shortcut .lnk when double-clicked in DOpus does not open in associated program, error message instead):

URL, PDF

2. STRANGE BEHAVIOR in DOpus and NORMAL BEHAVIOR in Windows Explorer (Shortcut .lnk when double-clicked in DOpus does not open in associated program, error message instead):

ZIP: When shortcut is double-clicked in DOpus opens a new Lister window with the same directory.

DOC (associated with OpenOffice.org Writer): Shortcut when double-clicked in DOpus does not open the original 9-page-document but this in OpenOffice.org Writer:


I think I have found the bug:

When creating a shortcut inside DOpus (with the context menu item "Create Shortcut(s) here") the result is an ordinary shortcut like the ones created in Windows XP: "shortcut.lnk".

When doing the same in Windows Vista Explorer the result is also a "shortcut.lnk" file, but unlike in Windows XP this seems to be a SYMBOLIC LINK. This means that on the application level the shortcut.lnk is treated like the original file where the shortcut is pointing to. (While ordinary Windows XP shortcuts are normal files with no special file-system features).

There is a simple visual indication for this difference (see also my screen-shots above):

A shortcut created from a internet shortcut .url by DOpus does not display the icon of the original file, while the same shortcut created in Windows Vista Explorer displays the icon from the original file! However this is not true for shortcuts to PDF files created in DOpus, which while showing the original icon do not work in the mentioned way.

If my above assumption about symbolic links is correct then DOpus should learn to behave like Windows Vista Explorer: Creating symbol links instead of ordinary XP shortcuts.

Addendum:

  1. In Windows Vista Explorer with the context menu item "Create Shortcut(s) here" I created a shortcut from a internet shortcut .url file.

  2. Then I opened this folder in DOpus and double-clicked the shortcut file which I've created before in Windows Explorer: NOW it opens the website in the browser without problems! This is the evidence that Windows Explorer created a symbolic link while DOpus creates an ordinary shortcut. (However both have the same extension ".lnk").

Unfortunately this does not apply to shortcuts pointing to PDF files which do not work in DOpus even when they are created in Windows Explorer. (However they do work in Windows Explorer of course).

How are you creating a symbolic-link in Explorer?

As I understand things, if Explorer is creating symbolic links and giving them .lnk extensions then that is completely wrong. Symbolic links should have the same extensions as the things they point to (and .lnk should only be used for shortcuts). I cannot see how to make Explorer create a symbolic link, though.

[quote="leo"]How are you creating a symbolic-link in Explorer?

As I understand things, if Explorer is creating symbolic links and giving them .lnk extensions then that is completely wrong. Symbolic links should have the same extensions as the things they point to (and .lnk should only be used for shortcuts). I cannot see how to make Explorer create a symbolic link, though.[/quote]

This simply was my assumption: that Windows Vista Explorer ALWAYS TRANSPARENTLY creates symbolic links as default, but still naming them .lnk files, maybe for backward compatibility?

Explorer doesn't create symbolic links here, and naming something that isn't a shortcut .lnk would break backward compatibility rather than preserve it.

I'm still confused about how you're creating the links/shortcuts in Explorer.

The post above says that if you use the right-click Create Shortcut(s) option in Explorer then the result works okay in Opus. Have I understood that correcrtly? If so, what's the method to create the thing which doesn't work in Opus?

This is correct.

As I said above, I create the shortcut in DOpus in the same way: With the context menu item "Create Shortcut(s) here".

And thinking logically: When creating something which looks identical, by two different instances with the same method, where one of the both things does work in both situations and the other only in one situation, the two things MUST be different.

And, always following the logic, when there is no known technical precursor of the thing created by DOpus which must be assumed to be an ordinary Windows shortcut, then the thing created by Windows Explorer and which works in both situations, could be assumed to be a technical successor aka symbolic link of the other thing. This was my thinking.

However, this does not explain why the thing created by DOpus does not work in DOpus but does work in Windows Explorer. This seems to be really complicated.

Creating a symbolic (soft) link requires Admin permissions so if you're not seeing a UAC prompt they're definitely not.

leo, here is the EVIDENCE:

  1. DOpus Resource Centre Index.URL is the internet shortcut created by dragging from the Firefox address bar to the DOpus Lister.

  2. DOpus Resource Centre Index (2).URL is the Windows shortcut created in Windows Explorer by using the context menu item "Create Shortcut(s) here".

  3. DOpus Resource Centre Index.lnk is the Windows shortcut created in DOpus by using the context menu item "Create Shortcut(s) here".

You can see that DOpus Resource Centre Index.URL and DOpus Resource Centre Index (2).URL have the same size of 52 Bytes, while DOpus Resource Centre Index.lnk has a size of 608 bytes.

leo, please follow this same procedure and post the screenshot here. I am very curious to see it.

Then please open all 3 files in a hex editor and tell me what you see.

Yes, when you use mklink. But, as I said, I suspect that Windows explorer does this TRANSPARENTLY. Could you please also make the test from my previous post and tell me the result?

Asking Explorer to create a shortcut to a .URL file will actually create a copy of the .URL file.

Doing the same in Opus creates a .lnk shortcut that points at the original .URL file.

So I see the same as you there (and always did). Which of those is the most "correct" is debatable but both are fine, IMO.

Where I see something different to you is that all three of the files work fine when double-clicked in Opus.

It might be worth setting another browser as the default, then setting IE back to be the default browser to ensure IE's filetype/registry settings are all in order. Can't think of much else that would affect this.


You are right, it is a copy and not a symbolic link.

OK, changed the default browser from Firefox to IE and then back to Firefox: Same situation as before. Didn't work neither while IE was the default browser.

Other test:

Dragging DOpus Resource Centre Index.lnk from DOpus to the Firefox browser window displays the text representation of the shortcut file:

[quote][InternetShortcut]
URL=http://resource.dopus.com/
HotKey=0
IDList=
IconFile=http://resource.dopus.com/favicon.ico
IconIndex=1
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2[/quote]

Dragging DOpus Resource Centre Index.lnk from Windows Explorer to the Firefox browser window does the same (text representation of the shortcut file).

BUT doubleclicking DOpus Resource Centre Index.lnk in Windows Explorer opens the web page!!

Dragging DOpus Resource Centre Index.lnk from DOpus to the IE browser window opens the web page!!

Dragging DOpus Resource Centre Index.lnk from Windows Explorer to the IE browser window also opens the web page.

The only clue I can see is the URL file type as a common link between these two facts:

  1. When creating shortcuts from files in Windows Explorer the URL file type is the only exception, where a file copy is created instead of a shortcut file.

  2. The URL file type is the only file type which does not work when creating shortcuts in DOpus.

So the conclusion for me is that this has generally something to do with the URL file type which creates a problem in DOpus on my computer.

Not sure why it's not working on your machine.

At least there is a workaround: Copy the .URL files instead of creating shortcuts to them.

Leo, which IE version do you have? I have IE8. There's a question I asked you in a posting above which you still didn't answer, which could possibly involve IE:

When you execute a shortcut .lnk to an URL file, which is your command line? Is it

or is it

So if IE8 is the culprit, as a solution I could write my own handler program for Windows shortcuts as a replacement for ieframe.dll and associate it with shortcut files.

Thank you very much for your help!

I'm using IE8 (as per the 2nd line of my 1st reply :slight_smile:).

For me, .URL files are always passed to the commandline, never .LNK (as per the 1st line of my 2nd reply :slight_smile:).