title: After Effects: How to launch an external process and detach it
body: <p>I've got an After Effects Scripting question, but I'm not sure it will be resolved with AE knowledge, maybe more with standalone development.</p>
  
  <p>I want to launch an external process from After Effects, actually I want to launch a render of the openned AEP file with the aerender.exe provided with After Effects while keeping it usable.</p>
  
  <pre><code>var projectFile = app.project.file;
  var aeRender = "C:\\Program Files\\Adobe\\Adobe After Effects CC 2018\\Support Files\\aerender.exe";
  var myCommand = "-project" + " " + projectFile.fsName;
  system.callSystem("cmd /c \""+aeRender+"\"" + " " + myCommand);
  </code></pre>
  
  <p>So I wrote this simple JSX code and it works, it renders the scene render queue properly.
  But After Effects is freezing, it waits for the end of the process.
  I want it to stay usable.</p>
  
  <p>So I tried to write a .cmd file and launch it with AE system.callSystem and I got the same problem,
  I tried to go through an .exe file (compiled from a simple python with pyInstaller), same problem :</p>
  
  <pre><code>import sys
  import subprocess
  
  arg = sys.argv
  pythonadress = arg[0]
  aeRender = arg[1]
  projectFileFSname = arg[2]
  
  myCommand = "-project" + " " +projectFileFSname
  callSystem = "cmd /c \""+aeRender +"\"" + " " + myCommand
  subprocess.run(callSystem)
  </code></pre>
  
  <p>I even tried with "cmd /c start ", and it seems to be worse as After Effects continue freezing after the process is completed.</p>
  
  <p>Is there a way to make AE believe the process is complete while it's actually not ?</p>
  
  <p>Any help would be very apreciated !</p>