Shell Execute Issue Shuts down both Apps

Hello:

I have a scenario where I’m using a Timer to check for a certain condition. If that condition is met, I use the Shell object to run another application. So far, all of that works.

Here’s where I could use some assistance:

After calling Shell.Execute, I want my desktop app to quit, however the other application still needs to continue running. Currently, when I call the Quit command, BOTH my desktop app and the 3rd party application closes.

Any thoughts?

Essentially, here’s what I’m wanting:

Desktop App 1 starts App 2.
Desktop App 1 shuts down.
App 2 keeps running.

Look for the “exec” command in shell.
See e.g. The Uses of the Exec Command in Shell Script | Baeldung on Linux

1 Like

If it is a desktop app you are calling you can get a folder item pointing to it and launch it. Then quit your main app.

1 Like

For what OS?

If macOS, I’ve had success using the open command. It launches the called application and is then not dependent on the calling app to stay alive.

But because you’re calling from Shell, you need to use the full path of the files involved, example:

$ /usr/bin/open /System/Applications/Calculator.app

Or if the app requires arguments:

$ /usr/bin/open -a /System/Applications/TextEdit.app '/Users/scott/myTextfile.txt'

Sorry. On Linux

Take a look at the nohup command for Linux.
nohup is short for no hang up and allows it to continue even if the shell is closed.

1 Like