I am not sure you can do it automatically, but you may try netsh.
netsh commandWhat's Netsh? How to run netsh How to configure the TCP/IP
protocol How to check the connection and opened port How to use netsh
commands for remote access ...
www.chicagotech.net/netsh.htm
--
Bob Lin, MS-MVP, MCSE & CNE
Networking, Internet, Routing, VPN Troubleshooting on
http://www.ChicagoTech.net
How to Setup Windows, Network, VPN & Remote Access on
http://www.HowToNetworking.com
"EMoscosoCam" <(E-Mail Removed)> wrote in message
news:F9F89CD2-0D2A-44C2-B49A-(E-Mail Removed)...
> Hello
>
> I have a laptop with a certain network configuration (with a static IP
> address). The laptop belong to a certain LAN. Now, suppose that I want to
> connect the laptop to another LAN by changing the ethernet cable. I would
> like to automate the change in the network configuration by using a
> script.
> Is it possible? Does anyone have develop a script like this?
>
> By the way, is there another way to accomplish the same thing? That is, to
> make a PC to belong to 2 LANs (not necessarily at the same time).
>
> Thanks a lot.