How do you change the IP address of your computer programmatically? Thank you for any help.
Joe
Printable View
How do you change the IP address of your computer programmatically? Thank you for any help.
Joe
what do you mean by change it?
is it DHCP? you just want to release and renew it?
or you want to actually hardcode in a different ip address?
I want to physically assign a specific ip address to the computer. I can simulate the actions of opening network properties, viewing the tcp/ip properties, and setting it to obtain an IP address, subnet mask, and default gateway. Is there anyway to change those 3 via API or some similiar means? Thank you
Joe
This info is probably stored in the registry. I don't have access to regedit at school, but try inputting your own subnet mask, then go to regedit and search for that specific number. When you find it, that is where it is stored in the registry.
If at all possible, I would rather simply to use some API call. API calls are more convenient and easier to document(when they exist). Thank you again.
Joe
You will have to use the API to access the registry from your program. I was just giving you a way to find it out, then once you know where it is, you can use one of the modules available on this site that let you access the registry.
In Windows NT particularly, editing the registry in such a way to affect all users can be tricky. If at all possible, I would like to use API to change the IP address(not API to edit the registry). Thank you