Page 1 of 1

"Send to" context menu invalid entries

Posted: 07 Nov 2018 11:08
by tedy
Just tried to use Send_to context menu for a file (haven't been using this menu for long) and send it to EmEditor (or other apps) and I got Non existing executable (C:\Program Files (x86)\Emeditor......), the same with WinHEX etc.
Yes, they don't exist in C:\Program Files (x86)\... but in C:\Program Files\...., e.g. they are 64 bit. I don't remember if I used 32 bit versions of these before.
In Explorer the context menu is right, they open the (normal, existing) 64 bit apps.
Is this a bug or where do I find the "32 bit sendto" (if there is such thing) to put my real shortcuts there?

Not using the "64 bit context menu" inside XY for few reasons.

Re: "Send to" context menu invalid entries

Posted: 07 Nov 2018 11:18
by admin
Works fine here (I use EmEditor myself). Maybe something is wrongly registered, registry remnants from earlier times...

Re: "Send to" context menu invalid entries

Posted: 07 Nov 2018 11:24
by tedy
My Windows installation is less than a year old. I think I've never installed 32 bit versions of most programs I see in Send To. Yet, XY tries to open program files (x86) versions...
In Windows Explorer it all works right. I thought XY "gets" the items for its Send To context submenu from the same place as WE?!
C:\Users\[username]\AppData\Roaming\Microsoft\Windows\SendTo

Re: "Send to" context menu invalid entries

Posted: 07 Nov 2018 11:41
by admin
I have no direct control over that menu. This is provided by Windows as is. :|

Re: "Send to" context menu invalid entries

Posted: 07 Nov 2018 11:49
by tedy
I just added a shortcut to another program in the above location - the notepad2-mod editor, located in C:\Program Files\Notepad2-mod\Notepad2.exe.
It appeared right away in XY (and WExplorer) but XY still tries to open C:\Program Files (x86)\Notepad2-mod\Notepad2.exe.

How's that..
I've never had notepad2-mod installed in (x86).

Re: "Send to" context menu invalid entries

Posted: 07 Nov 2018 12:19
by admin
OK, so that shortcut was wrongly constructed. This is a common error among many shortcut constructing applications. Most (incl XYplorer) use a Windows API function to do this and there is the error: They use the wrong environment variable to refer to the Programs folder. They use %ProgramFiles% but they should use %ProgramW6432%. Only the latter points to the 64-bit ProgramFiles folder independently of the bitness of the process they are running in.

Re: "Send to" context menu invalid entries

Posted: 07 Nov 2018 12:35
by tedy
Ok, what can I do to fix this then?
This is the shortcut properties window, all looks good to me, no env vars here.
I used WIndows Explorer to create the shortcut - Copy on the real exe, then in the above location -> right click - paste as shortcut.
shortcutnotepad2.png

Re: "Send to" context menu invalid entries

Posted: 07 Nov 2018 12:43
by admin
Good question!

Let's first verify that I'm right. When you Raw View that LNK (C:\Users\%username%\AppData\Roaming\Microsoft\Windows\SendTo\EmEditor.lnk) with "Extract Text" ticked, what do you see?
In my case it's hard-coded to "C:\Program Files\EmEditor\EmEditor.exe", no environment variables used, no problems.

Re: "Send to" context menu invalid entries

Posted: 07 Nov 2018 13:28
by tedy
Hm... It seems maybe it's the way XY enumerates/uses the SendTo folder.
When I open the location in XY, almost all my (custom) shortcuts were with generic icons. Except EmEditor (which isn't working as well).
What I see with Emeditor shortcut selected is attached. But Raw View for Notepad2 was lacking the %ProgramFiles% var and line altogether, only one line with path to the exe and it wasn't working too.
On the screenshot Notepad2 is already seen with its real icon after I tested something - I pasted (as shortcut) the notepad2.exe executable right within XY, and not in WExplorer (as before).
Now Notepad2 works and Raw View shows the same info as before when it wasn't working. Strange what was the difference..

I got used to use Explorer when doing such more "system" things that can involve system folders because XY is 32 bit and I had problems before when working with certain system folders. Not being a 64 bit app creates numerous headaches.
I guess I'll recreate shortcuts from within XY to make them usable :) .
rawviewemeditor.png