shell "cmd /c YourPgm.exe >c:\YourFile.txt"
is allso useful if you want to get the output form a program (IPconfig, dir, mem)in the file, for later use.
Then you can open the file, read the line you want, and get the positions you want fromm it.