I presume you want to ascertain the IP address from an addmin script and not a logon script. The location in the registry that holds the IP is named differently on each PC. I suggest you look at another way. If you use DHCP, you can query from it. Likewise, from the WINS DB.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.