Launch client from another client Advice/Help

I want to launch a client from another client holding another project.
system.util.retargeting() is not an option since that client is replaced by the “new” client and the old client gets closed/replaced.
Maybe is possible to use retargeting without closing the current client and open as a new instance??
Any advice?
The idea is to create a master project that manages the others.
Another option could be to launch the same client multiple times and from there I could use retargeting from one of a particular client.
This is driving me crazy since it’s seems easy but it’s actually hard.
Please help!!

I’d say you would have to use system.util.execute to create a new instance.

2 Likes

This does give a clue, however there’s a couple things that are not clear for me:
I’m using V.8.0.9
First, should I find the path where visionclientlaucher. exe, I realized that in the documentation, they refer to it as “clientlauncher.exe”. Is it the same?

Second, the rest of the command should something like this scope=C project=myproject windowmode=window, but are those next command to perform in system.util.execute()
I mean:
system.util.execute([“C:\ClientLauncher\clientlauncher.exe”, “application=myproject”])
or
system.util.execute([“C:\ClientLauncher\clientlauncher.exe application=myproject”])
or
system.util.execute([“C:\ClientLauncher\clientlauncher.exe” application=myproject])
Which should work?

I had checked:

But it’s been applied for another purpose…

Thanks for reply Mr. @JordanCClark

Is the correct syntax. clientlauncher.exe is the 7.9 and prior version’s executable; visionclientlauncher.exe is the 8.0 version executable.

1 Like

Thanks MR. @PGriffith for clarification. Let’s forget about .execute for a moment
I just want to launch a client executing a project from cmd (windows)
In cmd I’m running

This doesn’t not lunch the client, this launches the Vision Client Launcher…

I mean. I want the image to run with a project and not the image
I’ve been thinking on creating a “Desktop Shortcut” and then try to run it from the cmd. But it’s kind of redundant.

Please some help…

Try checking the visionclientlauncher.log in .ignition/clientlauncher-data/; you should see something like this; recreating that (not all of those parameters are strictly necessary) would be the way to directly launch a client, just like the launchers do themselves:
INFO [LaunchUtil ] [2020/01/15 09:18:53]: Starting Java with the following parameters: C:\Users\pgriffith\.ignition\clientlauncher-data\..\cache\resources\runtimes\11.0.5\bin\java.exe -classpath C:\Users\pgriffith\.ignition\clientlauncher-data\launchclient.jar -Djavaws.sr.gateway.addr.0=http://docker.ia.local:51942 -Djavaws.sr.launchts=1579108733090 -Djavaws.sr.main=com.inductiveautomation.factorypmi.application.runtime.ClientLaunchHook -Djavaws.sr.platform.edition= -Xms32M -Xmx256M -Djavaws.sr.memory.init=32M -Djavaws.sr.memory.max=256M -Dsun.java2d.d3d=false -Dsun.java2d.noddraw=false -Djavaws.sr.screen=0 -Djavaws.sr.scope=C -Djavaws.sr.project=PR7942_Docker_20191211 com.inductiveautomation.ignition.client.launch.BootstrapSwing

mmm I see… I need to check this paraments cuz I’m getting an error
image

Ok Mr. @PGriffith, I successfully launched the client from cmd. Thanks!!
Now how can I apply this inside system.util.execute() in a button from another Client.
Would be as easy to copy C:\Users\pgriffith.ignition\clientlauncher-… inside the function?

I feel I’m so close but nothing yet.
From cmd I can launch client, now the idea is to perform it from a button in another client

I tried system.util.execute([“C:\windows\system32\cmd.exe”,"/C",“start”,"C:\Users\jespin\.

But this button is not doing nothing.
I addition I made a test on a button with:
system.util.execute([‘notepad.exe’,‘c:\program files\inductive automation\ignition\license.txt’]) and works perfecty!!

Is something with the call from cmd that I’m not doing it right, please some help…

I have this barely working, the client is launching but never complete the manifest

image

It’s been loading for more than a minute…

I’ve seen so many option in the usage of “/” “\” “” and even with the single and double (’ “”). and I need some clarification because if use some of them I seems to be doing something and other times don’t

Thanks for reply Mr. @jcoffman and advice, I’ll try it and keep you online

Thanks @jcoffman, @PGriffith, @JordanCClark Now I have all pieces to make it work!