Page 1 of 2

Open with user command no longer working

Posted: 03 Jul 2025 11:22
by Sander Bouwhuis
I have used the following user command for many years (but it has been a while since I last used it):
2025-07-03 11-16-02 Manage_User-Defined_Commands.png
2025-07-03 11-16-02 Manage_User-Defined_Commands.png (18.55 KiB) Viewed 5620 times
Previously, the output of the Hash.exe function would go to the directory of the supplied file items. Now, the resulting files are outputted into the XYPlorer install directory. I therefore suspect that the 'current directory' is not set correctly anymore when running an 'open with' user command.

Re: Open with user command no longer working

Posted: 03 Jul 2025 11:42
by highend
And the hash.exe is from where (url)?

Re: Open with user command no longer working

Posted: 03 Jul 2025 13:20
by Sander Bouwhuis
It is my own C++ developed application to determines all sorts of hashes for files:
https://www.mensinmotus.com/hash/hash.html

I've been using it for many years without problems.

Re: Open with user command no longer working

Posted: 03 Jul 2025 13:32
by highend
No problems here with 27.00.0810, all items are renamed exactly where they are...

Re: Open with user command no longer working

Posted: 04 Jul 2025 04:34
by Sander Bouwhuis
Huh?!? That is so weird.
I tried it with some random files, both using the shortcut key and by running it from the user command menu.

Source: M:\Hash File Test\*
Destination: C:\Utilities\XYplorer

Does XYPlorer supply the full path names like this?
"M:\Hash File Test\Test file 1.txt" "M:\Hash File Test\Test file 2.txt"
Or like this?
"Test file 1.txt" "Test file 2.txt"

If it is with full qualified pathnames, then I still suspect this has something to do with setting the current dir when executing the command line. It should be in the directory where the command has been called from for this to work properly.

Is there a way I can debug this by showing which command line XYPlorer is calling before actually calling it?
Or could I maybe see the command prompt window XYPlorer starts where it pauses when it is done so that I can see the output?

Re: Open with user command no longer working

Posted: 04 Jul 2025 07:39
by RalphM
Switch on Step mode for scripting?

Re: Open with user command no longer working

Posted: 04 Jul 2025 09:30
by highend
It won't help to turn that option on for this case.

The only thing that is part of XY's scripting engine here is: <selitems>

So you could just have used
text <selitems>;
to see what it returns:

Code: Select all

"full path 1" "full path 2" "full path x"
The help file has even an own section for it^^
rtfm "idh_variables.htm#idh_var_selitems"

Re: Open with user command no longer working

Posted: 07 Jul 2025 07:29
by Sander Bouwhuis
1. Can I download older versions of XYPlorer to see when the (possible) regression occurred?
2. Will it mess with my settings if I do that? If so, which files do I need to backup and restore after the test?

Re: Open with user command no longer working

Posted: 07 Jul 2025 10:07
by highend
01. Via the freezer and the beta thread
02. It will downgrade your XYplorer.ini
Better backup your <xydata> folder first

Re: Open with user command no longer working

Posted: 07 Jul 2025 15:14
by Sander Bouwhuis
I downgraded to v20.00, and that one works.
I then upgraded that version to the current version and that one then works too.

But, with the current version, even if I delete the user command and recreate it, it fails.

Can you see what the difference is between the settings?

FAILS:
Udc.dat for current version.7z
(3.19 KiB) Downloaded 98 times
WORKS:
Udc.dat upgraded from old version.7z
(302 Bytes) Downloaded 87 times

Re: Open with user command no longer working

Posted: 07 Jul 2025 15:37
by highend
Using your "Udc.dat for current version.7z" works fine here on 27.00.0905

You did try that command with a fresh instance?

Re: Open with user command no longer working

Posted: 07 Jul 2025 15:46
by Sander Bouwhuis
I found the bug (it took me quite a lot of searching).

The bug occurs in the XYPlorer.ini. If I change the Open64 setting to 1, it starts failing.
I don't know what that setting is for, but hopefully you can now reproduce the problem.

WORKS:
[general]
Open64=0

FAILS:
[general]
Open64=1

Re: Open with user command no longer working

Posted: 08 Jul 2025 00:38
by highend
It doesn't work since XYplorer 23.00.0308 where that option was introduced.
Which environment is loaded and why it doesn't work with your hash command... No time to investigate this

Re: Open with user command no longer working

Posted: 08 Jul 2025 08:43
by admin
You can control this setting here: Configuration | Other | Shell Integration | 64-bit Windows | Open files from 64-bit process

FYI, this is one of the settings that was dropped in the 64-bit version. Consequently, your issue will also disappear in that version.

Re: Open with user command no longer working

Posted: 08 Jul 2025 08:49
by highend
It doesn't work at all (no renaming happens and the files to rename stey where they are) in the current TB beta...