Problem with XYplorer's single-instance setting
Forum rules
READ THIS AND DO IT!!!
Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
READ THIS AND DO IT!!!
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).
-
bossebengt
- Posts: 16
- Joined: 11 Feb 2018 18:36
Re: Problem with XYplorer's single-instance setting
Could you get back to me with which env vars are relevant for the single-instance mode? Maybe that will help me fix this.
-
highend
- Posts: 14991
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Problem with XYplorer's single-instance setting
No clue, can't replicate that behavior here. Compare all env vars and set them in the other environment to make them equal.
It musn't be a specific path, maybe it's enough that the environment differs. Again: Why do you get different env settings
from the OS?
Try this one in the meanwhile:
It automatically transforms the first parameter (if the passed file / folder really exists!) into a script command, like:
to:
It musn't be a specific path, maybe it's enough that the environment differs. Again: Why do you get different env settings
from the OS?
Try this one in the meanwhile:
It automatically transforms the first parameter (if the passed file / folder really exists!) into a script command, like:
Code: Select all
"D:\XY_Single instance launcher" "<path to xyplorer.exe>" "%TEMP%"Code: Select all
"D:\XY_Single instance launcher" "<path to xyplorer.exe>" /script="::goto 'C:\Users\<username>\AppData\Local\Temp';" /flg=2To see the attached files, you need to log into the forum.
One of my scripts helped you out? Please donate via Paypal
-
jupe
- Posts: 3462
- Joined: 20 Oct 2017 21:14
- Location: Win10 22H2 120dpi
Re: Problem with XYplorer's single-instance setting
Just a theory I'm throwing out there, the environment vars could be different because he seems to be loading it through a text editor so it may inherit the environment variables from Sublime/EMACs.highend wrote:Why do you get different env settings from the OS?
-
bossebengt
- Posts: 16
- Joined: 11 Feb 2018 18:36
Re: Problem with XYplorer's single-instance setting
I don't know why. This might be due to the internals of Emacs or Sublime.
I start cmd.exe, then launch Sublime/Emacs from that shell, then start XYplorer from Sublime/Emacs. Gives different env than starting from cmd.exe directly.
I'm content for now, I don't want to take more of your time. I would be happy if this could be solved in xyplorer.exe though, but no rush anymore. I bought it already due to your awesome support and product.
I start cmd.exe, then launch Sublime/Emacs from that shell, then start XYplorer from Sublime/Emacs. Gives different env than starting from cmd.exe directly.
I'm content for now, I don't want to take more of your time. I would be happy if this could be solved in xyplorer.exe though, but no rush anymore. I bought it already due to your awesome support and product.
-
Marco
- Posts: 2354
- Joined: 27 Jun 2011 15:20
Re: Problem with XYplorer's single-instance setting
I know I'm not solving the problem but maybe I'm providing useful debug info for Don:
This behaviour doesn't seem influenced by calling XY with different priviliges. In fact, with the single-instance option, I can't launch both one regular and one elevated instance at the same time. This under W8.1 x64.
This behaviour doesn't seem influenced by calling XY with different priviliges. In fact, with the single-instance option, I can't launch both one regular and one elevated instance at the same time. This under W8.1 x64.
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
-
klownboy
- Posts: 4467
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440
Re: Problem with XYplorer's single-instance setting
You may be right about that jupe. We found out that this is definitley the case when starting XYplorer via AHK.jupe wrote:Just a theory I'm throwing out there, the environment vars could be different because he seems to be loading it through a text editor so it may inherit the environment variables from Sublime/EMACs.
-
bossebengt
- Posts: 16
- Joined: 11 Feb 2018 18:36
Re: Problem with XYplorer's single-instance setting
But then again, I start Emacs from the same place, so Emacs should inherit its environment from cmd.exe anyhow.klownboy wrote:You may be right about that jupe. We found out that this is definitley the case when starting XYplorer via AHK.jupe wrote:Just a theory I'm throwing out there, the environment vars could be different because he seems to be loading it through a text editor so it may inherit the environment variables from Sublime/EMACs.
I still have the issue. I don't want to spend too much time thinking about it - I'm super busy these days. As a software developer, the following things come to mind:
1. Is a mutex used to ensure single instances? (I would guess so since mutexes are kernel objects and running xy elevated doesn't get around single instance mode, according to some poster above)
2. What env vars are used in xy to manage instances? I guess I could post the env vars from the two different xy instances if that's of any help (I checked it myself and the only real differences seem to be a few %conemu...% vars, but if you think the env vars can affect the behavior, I'll post them)
3. It seems that xy starts a new instance if it can't grab a hold of the previous instance, NO MATTER THE SINGLE INSTANCE SETTING
Get back if I can do anything to help.
Oh and PS:
Your support is absolutely awesome!
-
admin
- Site Admin
- Posts: 66534
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Problem with XYplorer's single-instance setting
FYI, all I do here is to check the (VB6) built-in App.Previnstance property right when an instance is started. It has its limitations (google it), but this thread is about the first time that it didn't do the job good enough for a user.
Indeed, using CreateMutex would be the way to go towards a more robust solution. I have currently other priorities, but this can be done later.
Indeed, using CreateMutex would be the way to go towards a more robust solution. I have currently other priorities, but this can be done later.
FAQ | XY News RSS | XY X
XYplorer Beta Club