How did I make it clear that a FreePascal/Lazarus solution is not what I want?
Well, the most logical answer to that would have been to post it on a Delphi forum, and not a Free Pascal forum. Most importantly, FPC has a quite complex library for executing external programs that can serve as a study object of createprocess and its various options.
Anyway, I've let this play out since it is mostly an Winapi issue, and you could get tips here that help you in Delphi too.
But since you seem to be not really interested in getting help otherwise than other people solving your problems for you, I think this thread is finished.