Page 1 of 1

XYplorer window title with multiple instances

Posted: 17 Nov 2024 15:38
by XAlphaClub
Hello

When you open multiple XYplorer instances by command line, they have the same name for Windows, even if you use the /title parameter and set the title bar template accordingly. This makes it impossible to use an external script to distinguish these instances (e.g. to close one without closing the others via taskkill). Steps to reproduce :

From XYplorer :
Configuration / Colors & Styles / Templates / Title bar --> <title>
Save parameters
Quit XYplorer

From command line :
"C:\Program Files (x86)\XYplorer\XYplorer.exe" /title="test1"
"C:\Program Files (x86)\XYplorer\XYplorer.exe" /title="test2"
"C:\Program Files (x86)\XYplorer\XYplorer.exe" /title="test3"

From PowerShell :
Get-Process | Where-Object { $_.MainWindowTitle } | Select-Object MainWindowTitle

Result :

All XYplorer instances have the same MainWindowTitle "XYplorer" instead of "test1 XYplorer", "test2 XYplorer" , "test3 XYplorer" (see screenshot below)
Could it be possible to transmit the /title parameter to Windows (see taskkill WINDOWTITLE parameter) ?

Thanks

Re: XYplorer window title with multiple instances

Posted: 18 Nov 2024 16:37
by admin
<app> is mandatory in the template. So set the template to <app> - <title>.

Re: XYplorer window title with multiple instances

Posted: 18 Nov 2024 16:44
by highend
That's not the problem.

The powershell script reports:

Code: Select all

MainWindowTitle
---------------
C:\Windows\System32\cmd.exe
Windows PowerShell
Windows Input Experience
XYplorer
XYplorer
XYplorer
While the three started instance all have a different window title (with the <app> - <title> template used)

Code: Select all

xyplorer.exe /title=hello1
xyplorer.exe /title=hello2
xyplorer.exe /title=hello3

Re: XYplorer window title with multiple instances

Posted: 18 Nov 2024 16:55
by admin
Hm, isn't that a powershell problem? I don't know another way to set the title.

Re: XYplorer window title with multiple instances

Posted: 18 Nov 2024 17:23
by XAlphaClub
admin wrote: 18 Nov 2024 16:55 Hm, isn't that a powershell problem? I don't know another way to set the title.
I think there is a hidden way : look to my PS screenshot in the top post. there is a line "Nircmd ... Moziilla Firefox". At this moment, I was on Nircmd site, using Firefox. And Firefox added title "Nircmd ..." to it's own app name.
But unfortunately I don't know the way ...

Re: XYplorer window title with multiple instances

Posted: 18 Nov 2024 17:40
by admin
powershell should report what's written in the main window titlebar. I don't know why it does not. Maybe it cannot handle 32-bit windows anymore?

Re: XYplorer window title with multiple instances

Posted: 18 Nov 2024 18:20
by XAlphaClub
It's a possibility. Nevertheless, I found a barbaric way to get around this problem: copy XYplorer.exe to XYplorerProjectMars.exe, XYplorer.ProjectArcturus.exe... And PS returns these names well.
Very dirty. But woks fine :party: