I'm working with a Pc that I have to connect to many different networks. Each time, I have to change my IP, my GateWay and my DNS and sometimes I also have to change my domain. Is there a way to write a script that could help me? Thus I would "apply" my network configurations instead of changing it line by line (I would have one script for each network).
Sorry, I forgot : I'm using Windows XP Pro SP2.
Combine
06-06-05, 12:02 PM
I think i have heared sonthing like that before ill have a look around for ya
wesmorris
06-07-05, 02:59 AM
of course you could do it with a batch file fairly easily.
do an ipconfig /? at a dos prompt and figure out the syntax for your batch file. you might have to use nslookup for DNS stuff, not sure. would have to look it up to figure it out for sure.
I just checked "ipconfig /?" but it doesn't seems to allow what I want. You can renew your IP on a DHCP network but how could it help me... Thanks anyway because it was a good idea and I found one solution : Netsh.exe (http://www.petri.co.il/configure_tcp_ip_from_cmd.htm)