Problem with XYplorer's single-instance setting
-
- 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.
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=2
One of my scripts helped you out? Please donate via Paypal
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?
-
- 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.
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]
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.
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440
-
- 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!
-
- Site Admin
- Posts: 60603
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @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 Twitter