title: elegant method to inject a dll to processes BEFORE they start
body: <p>I am making a 'mod' dll that modifies behaviour of the target process. I succeeded to inject my dll and hook some functions of target.</p>
  
  <p>But it requires more work to do when I need to hook some APIs BEFORE main module starts(more clearly, before the entry-point). I need to start the target program manually with CREATE_SUSPENDED attribute, inject, then resume. But some applications start with its own launcher program, some often start from x64 processes... such various environment make it hard to automate it.</p>
  
  <p>Seems like the best way's inject hooking dll to all process and handle CreateProcess. But sometimes it requires UAC, x64 developement.</p>
  
  <p>Any advice would be appreciated.</p>