How To Auto End/close Complied EXE PROGRAM on publication Exit

Its Good to run a complied exe program by " RunAProgram" function
But how to Autoclose that complied exe programe on exit of pubication once executed.
As “ExitPublication” / “Macro Exit” is ending/closing publication only. executed Program/scripts are not getting closed/ended.

Can you help please. i am registered user of html exe 3.6.

This is not possible in the current version, we would need some specific Windows API as explained here: