There is no interaction of AE with external apps in scripts. That would require a real plug-in and even then is quite tricky du to synchronization and security considerations. If you want an app to return a specific result, that app by itself would have to trigger a script in AE by e.g. handing over a commandline parameter whiel launching AE, but that's as good as it gets. Otehrwise you can only check if e.g. some files have been created or items in the project have been updated.
Thank you for your answer.
Someone give me another tip to do this:
toExecute = File("d:\\start.bat")
It does exactly what I was looking for.
Isn't that deprecated?
I don't know, maybe.
Nevertheless it works on my AfterEffects CS6.