Lanching application

R

Roberto

Hi there,
Hi want to start multiple sessions of an application that is not multi-tread
(in windows) any idea about this.

I think that it can be started as a subprocess of a (python) session??

Thanks !
Rob
 
R

Roberto

Thanks for the reply i will try to see if i can start multiple session with
win32api.WinExec().

Bye,
Rob
 
R

Roberto

I've tried win32api.WinExec but it seems to lanch application as single
session.

What i'm trying to do is lanch multiple session of a program that natively
runs only in single session (i know that is possible).

Any idea about this?

Thanks,
Rob
 
B

Bengt Richter

I've tried win32api.WinExec but it seems to lanch application as single
session.

What i'm trying to do is lanch multiple session of a program that natively
runs only in single session (i know that is possible).

Any idea about this?
You mean like this?

(Two instances of notepad running at this point)

Regards,
Bengt Richter
 
R

Roberto

Hi Bengt,

well not really...

Notepad is natively a multi-session program i mean it can run any
number of itself cleanly.

What i'm trying to accomplish is to launch an application that is not
"multi-session". I know that this is possible (tricks in the
process/applications threads) but i dont know how :)

Any idea??

Thanks for reply!
Rob
 
B

Bengt Richter

Hi Bengt,


well not really...

Notepad is natively a multi-session program i mean it can run any
number of itself cleanly.

What i'm trying to accomplish is to launch an application that is not
"multi-session". I know that this is possible (tricks in the
process/applications threads) but i dont know how :)

Any idea??

I'm not sure what you mean by "natively multi-session." ISTM that's the default. If an OS normally
launches programs in separate processes, UIAM the programs have to be programmed specifically
to _prevent_ running simultaneously. Various tricks can be used to accomplish that,
so if you have a program that "is not multi-session" because it is successfully
noticing that it is not the first instance to run, and exiting (some might communicate
parameters to the running instance before they do that), then ISTM you are asking
how to interfere with that program logic. E.g., if it is mutex-based, can you
prevent the second instance from seeing the mutex? What if it's based on a lock file,
or scanning current windows for title text? If there's a DLL using a shared memory section
to act as a mutex, maybe there's a way (OTTOMH I don't know of it, but I wouldn't be surprised.
I haven't had to deal with that situation) to tell windows always to create new instances of shared
sections for it, and maybe that's what you are asking, but then you'd have to know that that's the
mechanism that makes your app "single session."

Maybe telling us what app are you trying to launch multiple instances of, and on what windows version
would get more helpful responses? ;-)

Happy Holidays,

Regards,
Bengt Richter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,173
Messages
2,570,937
Members
47,481
Latest member
ElviraDoug

Latest Threads

Top