John,
You can skip a couple of those steps. The article on my website shows how you can redirect a DOS command right from within the ShellExecute call.
>Sorry Dave, I mis-spoke. I wrote a program that creates a batch file on the fly, runs via shellexecute and redirects the output of ipconfig to a text file. I just strip the ipaddress from that. It works so far.