Look at the sample project here:

http://www.vbforums.com/showpost.php...9&postcount=14

Doesn't handle the environment variables, but that can be added with some work. The example is running cmd.exe and then using that to run a program, but you can just as easily run an individual program itself, like your PHP CGI.