How to control which X2 instance starts a new instance

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

Post Reply
otlaolap
Silver Member
Silver Member
Posts: 236
Joined: 2007 Aug 11, 21:37

How to control which X2 instance starts a new instance

Post by otlaolap »

This is an absurdly minute technical customization question. I normally start X2 without using the /P (start in a separate process) option. Sometimes, however, I need (i.e. want) to start an instance separately, and so use the /P option to do this. So, at that time, I will have a P version and a Non-P version running simultaneously.

Subsequently, however, when I start additional instances with no /P option specified they are started in this /P-enabled instance. In fact, if I start several instances with a /P option, subsequent instances without the option always seem to start in the last instance launched with the /P option.

I would very much like this not to happen: the /P versions were special and separate for a reason. I know that I could start every instance with a /P option, but in the general case where nothing special is needed it seems better to have all the windows running in the single process. That is the normal design and intent of X2.

Is there any way to force these /P-enabled instances to stay private?

(Now, for anyone who cares, why am I doing this? I am using seven X2 windows to sort a bunch of stuff into categories. Each of these X2 windows has its own customized icon. The windows API method of sending WM_SETICON is not reliable -- google has lots of discussion on this -- so I have resorted to copying the X2 installation folder into seven different folders, supplying each with its customized X2 icon, and then starting the seven windows from these seven differently-located Xplorer2_64.exe files, each with the /P option. This works well: I get seven X2 windows with seven different icons. But thereafter when I start a window for ordinary X2 work, pointing at the unmodified installation folder with its unmodified icon, and not using (as is normal) the /P option, I get a new window with the last-opened one of the seven customized icons. That is what I seek to change. If the Windows WM_SETICON actually worked I would not need to do this hackery. If there is another method to accomplish this I am happy to try. If you are still asking "why am I doing this" and don't think the reasoning above is enough, I will add "it is my hobby" and "it is fun to make things work the way I want them to work even if that is a total waste of time". If Kilmataed were here he likely would agree and know quickly how to accomplish the result.)
User avatar
nikos
Site Admin
Site Admin
Posts: 15771
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: How to control which X2 instance starts a new instance

Post by nikos »

short version: it's not possible to control which instance (process) gets the new windows
perhaps you can run your /P version as a different USER ?
otlaolap
Silver Member
Silver Member
Posts: 236
Joined: 2007 Aug 11, 21:37

Re: How to control which X2 instance starts a new instance

Post by otlaolap »

Okey doke. I just added logic to my X2 invoking routine for general use, the one which starts each instance and places it where I want it, to detect if any special X2 windows are open and then, if so, to add /P to the parameters for the new window. This means that almost always I am using the normal non-private windows in day-to-day work. It is just when I am doing this special /P-enabled work that I will do the extra overhead of starting an unnecessarily private regular window.
Post Reply