wrote same script using ipconfig

This does the exact same thing as the other script.