ipconfig /all > nomefile.txt

e poi leggi il file