I've been trying to make sense of some behavior which has been bugging me for a long time now and spent a few hours examining it.
I'm using Total Commander in a portable setup, which means I make heavy use of relative path addressing within Total Commander with %COMMANDER_PATH% being the starting point to include plugins, inis, viewers and the custom editor, which in my case is PsPad. It all works like a charm, EXCEPT when it comes to launching files for editing in PsPad with F4.
While the first file opens fine in a newly launched PsPad, all following files which I want to edit with F4 open in the already launched PsPad with PsPad.exe for binary editing in a tab and in an additional tab the file which I actually want to edit.
I've experimented with quotes around the editor program and for the filename parameter in multiple ways.
I've tried different paths for TC and PsPad, still maintaining the relative path for the editor call.
It seems to me as soon as there's a relative path portion, like "." (current directory) or ".." (parent directory) within the editor program path, this odd PsPad behavior occurs. But it only occurs with PsPad, it doesn't happen with Notepad++ which I also tried during my research efforts.
To make things worse, this behavior is not persistent even with the same configuration. Switching back and forth between different editor path addressing methods in TC, it sometimes works without a problem with ".."s in the path.
Maybe at least one or some of you can confirm this in their own environment. Or maybe I'm the only one... or I'm nuts.
Here's what I tried:
Fresh portable installation of Total Commander 9.51 (64+32) in C:\test\TC
Freshly unpacked PsPad 5.0.3 in C:\test\PsPad
- Launch TC 64bit
- Configure Editor to: C:\test\PsPad\PsPad.exe "%1"
- Press F4 on a text file
- PsPad starts and opens the text file
- Back in TC, press F4 again on another text file
- PsPad opens the other text file in a new tab
-> All fine
Now let's try that with just a tiny bit of relative path addressing for the editor. make sure you close TC and PsPad before you start over.
- Launch TC 64bit
- Configure Editor to: C:\test\TC\..\PsPad\PsPad.exe "%1"
- Press F4 on a text file
- PsPad starts and opens the text file
- Back in TC, press F4 again on another text file
- PsPad opens its own binary PsPad.exe in a new tab and in addition the other text file in another tab
-> NOT fine
Issue when launching PsPad editor with relative program path
Moderators: Hacker, petermad, Stefan2, white
Re: Issue when launching PsPad editor with relative program path
I tried it, and I can confirm it. It's a PsPad issue. Open a CMD and run these commands:
The same issue will occur. PsPad's command line parsing routine seems to get confused by such paths, at least when the single instance option is enabled (I wasn't able to disable it, so I couldn't test it with multiple instances).
My guess is that it compares its own path (C:\test\PsPad\PsPad.exe) to the path of the newly launched instance (C:\test\PsPad\Colors\..\PsPad.exe) - which obviously fails in such a case. But that's just a shot in the dark, and up to the developer to find out and solve
.
Regards
Dalai
Code: Select all
C:\test\PsPad\PsPad.exe C:\some\file.txt
C:\test\PsPad\Colors\..\PsPad.exe c:\some\other\file.txt
My guess is that it compares its own path (C:\test\PsPad\PsPad.exe) to the path of the newly launched instance (C:\test\PsPad\Colors\..\PsPad.exe) - which obviously fails in such a case. But that's just a shot in the dark, and up to the developer to find out and solve

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: Issue when launching PsPad editor with relative program path
I've made a test with pspad 32bit 5.04 (385) using a button TC 9.51 32/64 bit
First time you launch pspad all is OK, next time you launch pspad you have this weird behaviour.
It is also the same from a cmd console.
This is a Pspad issue !
You can report bug in pspad forum.
Code: Select all
command: %COMMANDER_PATH%\..\pspad\PSpad.exe
parameter:%P%S
It is also the same from a cmd console.
Code: Select all
:From pspad folder
..\pspad\pspad.exe PSPad.url
..\pspad\pspad.exe Licence.txt
You can report bug in pspad forum.
Re: Issue when launching PsPad editor with relative program path
Why don't you use the %COMMANDER_DRIVE% as start ?
No need for any .. contructs
No need for any .. contructs
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.55 RC1 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.55 RC1 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Re: Issue when launching PsPad editor with relative program path
Hello
I got information about this problem on Jan. 10th. from one my user.
This problem was solved and fixed version will be available in the next build of PSPad editor 5.0.5 in PSPad developer forum
Next time please write me to support mail.
Jan Fiala
I got information about this problem on Jan. 10th. from one my user.
This problem was solved and fixed version will be available in the next build of PSPad editor 5.0.5 in PSPad developer forum
Next time please write me to support mail.
Jan Fiala
Re: Issue when launching PsPad editor with relative program path
Thank you Jan, I was about to announce the fix here as well but you were quicker 
