The Process object in my http://www.b4x.com/forum/additional...ing-library-optimising-compiler.html#post8739 (you don't need to use Threads or optimise compile to use the Process object) is an enhanced Shell that can monitor a Process it has started for its exit and can close it cooperatively by CloseMainWindow or forcibly by Kill.