Fix for 64bit Explorer Context Menu in XYplorer

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
FeatureCreep
Posts: 162
Joined: 02 Dec 2011 21:18

Fix for 64bit Explorer Context Menu in XYplorer

Post by FeatureCreep »

I was going to post this under "Other Software" but I think it belongs here. It is also in answer to the question posed in "Shell integration? Comodo" http://www.xyplorer.com/xyfc/viewtopic.php?f=3&t=9386 but I wanted a more descriptive thread title.

----------------------------------------
[Skip this first part if you're in a hurry]

Problem:
The shell extension (Explorer right-click context menu item) of your 64bit app doesn't show up in XYplorer's context menu.

Example:
Comodo Internet Security has two shell extensions
Scan with COMODO Antivirus
Run in COMODO Sandbox
That don't appear in XYplorer's context menu.

Option 1 (bad choice):
Install a 32bit version alongside the 64bit one.

Not feasible for many apps (and often the installer won't let you do it), especially a big one that is tightly integrated with your system like an anti-virus. You don't really want two versions of apps on your system (there's enough duplication going on with 64bit as it is). If you have a problem with the app, you can never be sure that it isn't caused by the presence of the two versions.

Option 2 (good choice):
Add a context menu item to Explorer (there are apps for doing this) that calls your 64bit app with the appropriate command line arguments.

This works for simple shell extensions (they appear in 64bit Explorer, in XYplorer and in the tree and list views of other 32bit apps). However, some apps don't accept command line arguments (or not the ones you need). This is the case with COMODO's cavscan.exe (I use COMODO and searched for this option without any luck).

Option 3 (best choice): Cautomaton
-----------------------------------------


Cautomaton
Cautomaton is a small (270KB) portable app that pops up the shell context menu when launched. You can then click the menu item you want and the action will be carried out on the item(s) selected in XYplorer's list view.

cautomaton64.exe pops up the shell 64bit menu
cautomaton32.exe pops up the shell 32bit menu

How to use it:

A). Getting the 64bit context menu in XYplorer
[The following is written with people new to XYplorer in mind]

1. Download Cautomaton (URLs below)
2. Unzip it to wherever you keep your portable apps.
In this example the location used is:
C:\App\Auto\Cautomaton\cautomaton64.exe

Using Cautomaton with XYplorer's Portable Open with... Menu (POM).
The POM is used to assign what apps are launched when particular items are double-clicked and also what alternative apps appear when you click XY's "Open with..." context menu item (i.e. the first one near the top). But you can also add simple or complex scripts to the POM so it is perhaps better to think of it as XY's alternative customizable context menu.

3. Navigate to the folder where you placed cautomaton64.exe
4. Create a shortcut to cautomaton64.exe in the same folder
[Select cautomaton64.exe > right-click it > click "Create shortcut"]
5. Rename cautomaton64.exe.lnk to cautomaton64.lnk (for the pupose of this example)
6. Open the shortcut's Properties dialog box
[Select cautomaton64.lnk > right-click it > click "Properties"]
7. Click the "Run" button and choose "Minimized"
8. Click the "OK" button
9. With cautomaton64.lnk still selected, click XYplorer menu items File > To Clipboard > Item Path/Names
[This copies the file's name and path to the clipboard]
10. In XYplorer click Tools > List Management > Portable File Associations
[This opens a dialogue box where you can add and edit items in the POM.]
11. Select a location at or near the bottom of the list (best place for scripts)
12. Click the "New" button (top right)
13. Paste the the path to cautomaton64.lnk into the text box (of the new POM item)
e.g.
C:\App\Auto\Cautomaton\cautomaton64.lnk

14. Edit the item to look like this (but with your path to cautomaton64.lnk).

|"64bit Context Menu"*;\>"C:\App\Auto\Cautomaton\cautomaton64.lnk" /p:@

If you want an icon other than the "hat" one that comes with Cautomaton to appear in the context menu, add something like this.

|"64bit Context Menu|C:\Myfolder\Myotherfolder\myicon.ico"*;\>"C:\App\Auto\Cautomaton\cautomaton64.lnk" /p:@

You can also tell XY to use the icon from an .exe file. For example, to use the standard Explorer icon, do this.

|"64bit Context Menu|C:\Windows\explorer.exe"*;\>"C:\App\Auto\Cautomaton\cautomaton64.lnk" /p:@

15. Try it.
-----------------------------------------

Troubleshooting
Make sure that options
Tools > Configuration > Menus, Mouse, Safety > Custom items in shell context menu
and
Tools > Configuration > Menus, Mouse, Safety > File List...(button) > Open with...
are checked.
Beyond that, ask in this thread.

Nuts and bolts:
1. Cautomaton
The /p argument pops up the context menu
The :@ parameter hides the author's signature graphic (an image of a hat which otherwise appears with the context menu).
A shortcut (.lnk file) was used (instead of executing cautomaton64.exe directly) solely to make Cautomaton appear minimized. Otherwise an unwanted DOS box (Command Prompt window) appears along with the context menu. There may be a command line argument (or other better way) to do this but there are other reasons to use a shortcut (e.g. using a different icon when there are no other means).

2. XYplorer
| (pipe) character at the start of the line is for actions that are not intended to be executed on double-click
"64bit Context Menu" is the caption that will appear on the menu
* matches all files (i.e. makes the POM item appear for all types of file)
/ matches all folders
; separates item types
> placed immediately before the app or script to be launched

-----------------------------------------

B). Using a hotkey (keyboard shortcut) to open the 64bit context menu.

1. Click menu items User > Manage commands...
2. Click the "New" button
3. In the list box "Category:" on the left
Select "Open With"
4. In the text box "Caption:" enter
64bit context menu
(or whatever)
5. In the text box "Application:" enter
"C:\App\Auto\Cautomaton\cautomaton64.lnk" /p:@
(using your path to cautomaton64.lnk)
6. Click the button "Assign Keyboard Shortcut..."
7. Pick one
8. Click the "OK" button.

You might find it easier to skip steps 6 and 7 above, and after clicking OK...
1. Click menu items Tools > Customize Keyboard Shortcuts...
2. In the drop-down button list "Category:" select "User"
3. Select "64bit context menu" (or whatever caption you chose)
4. Try out different key combinations in the "Press new shortcut:" box

Note: In the above two dialog boxes you will see a button with a number like "#1400" (preceded with the hash symbol). This is the function ID which has been automatically assigned to your new User Defined Command. This ID can be used as a shorthand for the full command anywhere in XY scripting.
e.g.
In the POM dialog (Tools > List Management > Portable File Associations...)
You could replace

|"64bit Context Menu|C:\Windows\explorer.exe"*;\>"C:\App\Auto\Cautomaton\cautomaton64.lnk" /p:@

with

|"64bit Context Menu|C:\Windows\explorer.exe"*;\>::#1400

[The double colon (::) is required]

-----------------------------------------

C). Accessing a specific item from the 64bit context menu directly.

Cautomaton can also activate a specific item from the 64bit context menu directly without popping up the menu (including items nested in sub-menus). The command switch to use is /m.

Enter this as a POM item

|"Scan for virus|C:\YOUR_PATH_HERE\COMODO\COMODO Internet Security\cavscan.exe"*;\>"C:\App\Auto\Cautomaton\cautomaton64.lnk" /m "Scan with COMODO Antivirus"

Scan for virus
is menu item caption you want to appear in XYplorer

C:\YOUR_PATH_HERE\COMODO\COMODO Internet Security\cavscan.exe
is the executable containing the icon you want to appear next to the caption

*;\
is the list of file types you want the item to appear for (i.e. the context)
[Note: if you want to be more specific the "PathExt" environment variable lists all executable file extensions on your system (e.g. com;exe;bat;cmd;vbs;vbe;js;jse;wsf;wsh;msc) but you should probably include installers like .msi and anything that might contain a macro]

/m
Match text (or other identifier of menu item to be activated)
i.e. instead of popping up the menu for user selection

"Scan with COMODO Antivirus"
is the caption that appears in the 64bit context menu in Explorer next to the item you want to activate
It is this text from the menu (enclosed with quotation marks) which identifies the action.
This will usually be the same as the caption you want to appear in XYplorer's POM.
I chose "Scan for virus" to differentiate for this example.

-----------------------------------------


Unfortunately the Open with... menu (POM) doesn't work in the XYplorer tree.

For experts only
To get the Open with... menu to appear in the Tree is more problematic than hacking a system file. You have to tweak the famously responsive but sometimes fickle donald.exe. Navigate to http://www.xyplorer.com/xyfc/ > Wishes, to interface with the donald.exe configuration dialog, and enter your arguments in the text box provided.

Maintaining donald.exe
Under no circumstances, place your donald.exe in the startup folder without including the switch /coffee, otherwise performance can be erratic. Also, if using donald.exe, it is advisable to create a system restore point just before 11 minutes past 11 on the 11th of November (every year) and to defrag the donald.exe disk clusters shortly after Ash Wednesday.

Troubleshooting donald.exe
If your donald.exe appears slow and unresponsive, the following may help.
Visit any of the pages listed here...
http://www.xyplorer.com/xyfc/viewtopic.php?f=6&t=1660
...and write a review of XYplorer.
Non native-English-speakers should seek out non-English sites to post reviews (now that XY is multilingual).

..../EndHumour

Actually, there may be a way to get the POM in the tree but it's complicated and I'll leave that for another post.

-----------------------------------------

Observations
So already a "fix" for the absence of the 64bit context menu in XYplorer provides much more functionality than you can get with 64bit Explorer. I've tested the above on my Win 7 64bit system. You get to use command line type options in hotkeys and scripts with apps that don't have any command line switches (but do have a shell extension). So using Cautomaton32.exe for the 32bit context menu (on both 32 and 64 bit systems) in XYplorer and elsewhere could also be useful.

Everything seems to work fine, except for items Cut, Copy and Paste (which won't be missed). I'll add further observations to this thread as they come. There are other Cautomaton options (two are listed below) but I haven't tried them yet.

Activating submenu items directly is done with the pipe character.
"Menu caption | Sub-menu caption"

Switches /s and /c access the context menu you get when holding down the Shift and Ctrl keys respectively.

Afterthought
After writing this I realized that it might be better to include the switches and icon path in separate shortcut files to Cautomaton. One for each menu item each named after the menu item caption.

-----------------------------------------

Where to get Cautomaton
http://whitehat.dcmembers.com/pages/sof ... omaton.php

It was developed from discussions at DonationCoder.com
http://www.donationcoder.com/forum/inde ... ic=24266.0
http://www.donationcoder.com/forum/inde ... ic=24568.0

Despite DonationCoder being a popular site, a Google search of "Cautomaton" doesn't return many hits (and none in combination with XYplorer -so I'm assuming it's new to other forum users). I did a lot of searching for something like this and there is plenty of demand in certain quarters. I don't think the author gets the recognition he deserves.

So, big hat-tip to "worstje" the gent with the hat.
Attachments
POM.png
POM.png (6.78 KiB) Viewed 7629 times

admin
Site Admin
Posts: 60595
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Fix for 64bit Explorer Context Menu in XYplorer

Post by admin »

Thrilling! :appl:

But... :mrgreen: ... I tried it in my VirtualBox Win7/64 and I got an error message:
Attachments
2013-03-13_203251.png
2013-03-13_203251.png (7.29 KiB) Viewed 7596 times

FeatureCreep
Posts: 162
Joined: 02 Dec 2011 21:18

Re: Fix for 64bit Explorer Context Menu in XYplorer

Post by FeatureCreep »

That's discouraging. Hopefully some other 64-bitters (or should that be biters?) will give it a try and report back. Maybe it's a VirtualBox thing.

I don't consider myself a tech-head so it's a relief when something like this works as advertised out the box. It was straightforward to set up.

admin
Site Admin
Posts: 60595
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Fix for 64bit Explorer Context Menu in XYplorer

Post by admin »

In the meantime I downloaded the missing file from http://de.dll-files.com/msvcp100.dll.html, and placed it in the folder of C:\Program Files\Cautomaton\cautomaton64.exe.

But now I get another error:
Attachments
2013-03-13_210338.png
2013-03-13_210338.png (7.2 KiB) Viewed 7589 times

FeatureCreep
Posts: 162
Joined: 02 Dec 2011 21:18

Re: Fix for 64bit Explorer Context Menu in XYplorer

Post by FeatureCreep »

Ah ... I didn't attempt to read the German in your message box. But "MSVCP100.dll" caught my eye.

Dependencies: you maybe need the Visual C++ runtimes on your system. From the author's page.
http://whitehat.dcmembers.com/pages/sof ... omaton.php

Requirements

Windows XP or newer. Both 32-bit and 64-bit varieties are supported.
Microsoft Visual C++ 2010 Redistributable Package (x86)
Necessary for Cautomaton32.exe to work.
64-bit: Microsoft Visual C++ 2010 Redistributable Package (x64)
Necessary for Cautomaton64.exe to work.

It kind of reminds me of the number of times I had to download runtimes for a great little portable app called Tracker, back in the day. :roll:

FeatureCreep
Posts: 162
Joined: 02 Dec 2011 21:18

Re: Fix for 64bit Explorer Context Menu in XYplorer

Post by FeatureCreep »

We seem to be posting out of synch (or rather I am). Got distracted and didn't see your second message box before my last post -about which I have no clue. :(

admin
Site Admin
Posts: 60595
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Fix for 64bit Explorer Context Menu in XYplorer

Post by admin »

Well, I don't have Visual C++ runtimes on my system, and MSVCP100.dll is probably just a part of what is missing. Too bad! :cry: But it seems this cautomaton thing is not portable enough. What a pity!

FeatureCreep
Posts: 162
Joined: 02 Dec 2011 21:18

Re: Fix for 64bit Explorer Context Menu in XYplorer

Post by FeatureCreep »

But, as happened with the VB runtimes, they will eventually become standard MS issue with new installs (at least until MS abandons them for the their next great leap forward).

I don't think portability is much of an issue. Most cyber cafes, for example, probably still use 32-bit systems. And 64-bit systems tend to be newer and are more likely to have those C++ runtimes already on board. I didn't have to download them for mine.

Let's see if there is better feedback from others.

The mysteries of the black hole that is Microsoft's WoW redirection does leave me bewildered. You're not sure if a system file is where it appears to be, or if it's the "real" one or a phantom, or whether it's dead or alive -quantum computing of a sort (lots of uncertainty but with no tangible benefit). :?

admin
Site Admin
Posts: 60595
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Fix for 64bit Explorer Context Menu in XYplorer

Post by admin »

FeatureCreep wrote:The mysteries of the black hole that is Microsoft's WoW redirection does leave me bewildered. You're not sure if a system file is where it appears to be, or if it's the "real" one or a phantom, or whether it's dead or alive -quantum computing of a sort (lots of uncertainty but with no tangible benefit). :?
Yes, it's their worst and most bewildering decision ever. Totally crazy. IMO everything after XP (i.e. the whole 6.* series) has traits of madness or simply failure. It seems like it all became too big for them, they cannot handle it anymore. Might not even be their fault; maybe it would have been too big for anybody. Anyway, I should now concentrate on my first coffee; I think I can handle it... :)

admin
Site Admin
Posts: 60595
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Fix for 64bit Explorer Context Menu in XYplorer

Post by admin »

Nobody else interested? :veryconfused:

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: Fix for 64bit Explorer Context Menu in XYplorer

Post by Filehero »

admin wrote:Nobody else interested? :veryconfused:
In such a mess? Sorry, no. :mrgreen:


Cheers,
Filehero

eil
Posts: 1622
Joined: 13 Jan 2011 19:44

Re: Fix for 64bit Explorer Context Menu in XYplorer

Post by eil »

for the moment i didn't really had problems with context entries, as i seldom use them. maybe it's only for now.
yet, i support words about bad portability which makes it unusable for me.
Win 7 SP1 x64 100% 1366x768

neminem
Posts: 94
Joined: 13 Aug 2012 20:31

Re: Fix for 64bit Explorer Context Menu in XYplorer

Post by neminem »

It looks like too much of a pain, I think. I'm waiting for the day when xyp just works natively for context menu items. Anyway, it isn't even just restricted to context menu items - for instance, I have a great tool for converting music files to different formats, whose context menu items don't show up, which is a pain. But what's a bigger pain is, it also adds a tab to the Properties of mp3 files that lets you edit their tags (yes, Windows has that natively, kinda, but it does an infinitely better job of it). That tab also doesn't show up if you open the file's Properties from xyp, which I'm assuming for the same reason.

fretless
Posts: 4
Joined: 06 Aug 2011 22:13

Re: Fix for 64bit Explorer Context Menu in XYplorer

Post by fretless »

I took the five minutes to download it and set it up. Your instructions are very detailed and helpful. It works perfectly for me.

So thanks very much for the post, you made my day!

Joe K
Posts: 2
Joined: 17 Mar 2013 13:05

Re: Fix for 64bit Explorer Context Menu in XYplorer

Post by Joe K »

Couldn't get Unlocker (x64) in the context menu either. (Win7) Tried the method suggested here and got the 64bit menu. Only problem is when I access it in the menu, Unlocker will only open one file to delete even though I have several files selected.

Solved it by adding Unlocker to XYplorer's Catalog and set it to "Open selected list items with application." Now I can delete several selected files by clicking Unlocker in the catalog. And I don't need to invoke the 64b menu either.

Post Reply