Context Menu Parameters

Hello,

I wrote a little program for copying and moving files. To open the program I added a context menu entry. The program needs to be given the path of the selected file (the file on which I right-clicked to open the context menu). Doing this in Windows Explorer works fine, but in Opus not the full name is passed, but a shortened name conatining a tilde (~). This results in the new file also having that name.
Is it possible to change Opus to pass the complete filename?

Thanks in advance,

KloolK

Which kind of shell extension is it? (i.e. How is it registered; if it's a COM object, which interface(s) does it use?)

There's probably a compatibility reason that Opus is sending the short-path. (e.g. If your shell extension only handles ANSI strings and the path contains a non-ANSI character.) I can check what's happening if you let me know the type of shell extension so I know which code-path to look at.

Aside from that, can't you just call GetLongPathName on the paths you get?

The entry is added by creating a new key in HKCR:*\shell and HKCR:\Folder\shell
The command which is executed on a click is "programmpath\programm.exe %1"

FWIW, I cannot reproduce what you're seeing. (I've tried on Windows 7 or Windows XP using Opus 9.5.x)


Yes, you're right. I just did the same you did and Opus passes the correct paths to cmd.exe.
Is it possible that it passes different paths to my .exe (It's written in Visual C# 2010 Express). I ask this because after some testing I noticed the following:
I created the Folder "C:\Neuer Ordner". Starting my program through context menu results in a shortened foldername. But dragging the folder inside Opus onto my programm inside Opus works absolutely fine.

Opus had no way of knowing what your program is written in so that would not be a factor.