October 2, 200619 yr Hey guys! (Another Question).Just wondering in xp or any other version, if i have my machine which gets its IP from a DHCP server, can i retrieve it from the Registry?Basically Im writting a app which gets the machines IP address, which then gets sent to a database.Any idea's how i could get the IP address? would it be in readable form, as in a string of ints?thanks!
October 2, 200619 yr It's located here:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{<GUID FOR YOUR NETWORK INTERFACE>}\DhcpIPAddress (it's a REG_SZ value). You'll find lots of other interface information here, updated every time the interface is refreshed (automatically or manually).
October 2, 200619 yr Author cheers, i was actually looking in there but didnt check the parameters tree lol mmm....how would one pull this info out? also how would i know which interface id it was, without actually going through the list?P.S Sorry about the additional questions Edited October 2, 200619 yr by phiban
October 3, 200619 yr These commands can tell you the adaptor and IP Address without you looking up the CLSIDs in the registry.ipconfigsysteminfowmic nicconfig GET Description , IPAddress
Create an account or sign in to comment