How to run a script from an app?

You can use unsandboxed application with system() API to call the script.

you can see here: