phiban Posted October 2, 2006 Share Posted October 2, 2006 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! Link to comment Share on other sites More sharing options...
cluberti Posted October 2, 2006 Share Posted October 2, 2006 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). Link to comment Share on other sites More sharing options...
phiban Posted October 2, 2006 Author Share Posted October 2, 2006 (edited) 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, 2006 by phiban Link to comment Share on other sites More sharing options...
Takeshi Posted October 3, 2006 Share Posted October 3, 2006 These commands can tell you the adaptor and IP Address without you looking up the CLSIDs in the registry.ipconfigsysteminfowmic nicconfig GET Description , IPAddress Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now