In a LAN, I configure my IP address as needed, but once in a while I move to a different subnet and need to update my IP address quickly so I am thinking of making a simple application to help me with this. Thus I would like to know where is the IP address settings stored in Registry?
In the old days of Win95 I could just search for the string, but now in Win10, the registry has become so huge it would probably take 8 days to end the search. Halp.
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces
but you have to find the appropriate{########-####-####-####-############}
container to adjust accordingly I suppose. Windows already has an app for this and also you can usenetsh
commands to set static IP settings and such too. Doing it from the registery seems like overkill but perhaps running applicablenetsh
commands from an app to spawn thecmd
and run the commands would work better for you instead.Cmd = ["cmd.exe", "/C", "netsh interface ip set address "Ethernet" static <IPAddress> <SubnetMask> <DefaultGateway> 1"]
followed bysubprocess.Popen(Cmd, shell=True)
or some variation as such may help.192.168.1.2
) your interface is assigned too—just start regedit, highlight Computer, press F3, and then type in the IP address and press Find Next. It'll stop at the location in the registry it finds the IP so you can record that, and then move onto to find other location. Your question probably has too much detail as really you just want to know where to find the IP address settings in the registry and what all you need to change for IP settings from there for it to become effective, you may need to reset some services afterxxxxx
or whatever and didn't have any luck. If you determined where it's stored and how you can change from there to make effective after the change, then you can move on and come back with another question for your task later.