[2.0.5] Win: App.open: not possible to start a second instance of a running exe --- confirmed

Asked by Alberto

On Sikuli 1.1.1 in order to open Remote Desktop connection I am using:

App.open(r'c:\\Windows\\System32\\mstsc.exe /span')

Now on version 2.0.5 I am using:

RDPApp = App( r'"c:\\Windows\\System32\\mstsc.exe"')
commandstring ='/span'
commandstring = r'%s'%(commandstring)
RDPApp.setUsing(commandstring)
RDPApp.open()

It is working fine but now on the new version has a different behavior: if I insert the code on a private function called "RemoteDesktopConnection" and I call twice, Sikuli opens the same instance of application RDP, on previous version Sikuli opened a new remote desktop instance. To be clear, on my previous version I opened a RDP calling RemoteDesktopConnection function, then minimaze the window and I used RemoteDesktopConnection fucntion again and Sikuli opened a new RDP connection window.

How can I open two different app instances of same exe in the same session?

Thanks

Alberto

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Alberto
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Sorry, but that is true.

App.open() looks for the exe in the task list and uses a running instance.
So it is currently not possible to start a new instance with App.open() in your case.

You have to look for other possibilities, to start a second instance (using some cmd scripts for example).

Revision history for this message
Alberto (berruson) said :
#2

Thanks for clarification.