"July" said:
Hello, I want to change the IP configuration on a Windows
XP Professional PC or notebook with just run a file, is
there any way to achieve that? All advice are welcome.
Use the "netsh" command in a batch file. To change a static IP
configuration, the command is:
netsh interface ip set address <connection> static <ip> <mask>
<gateway> <gateway metric>
For example:
netsh interface ip set address "Local Area Connection" static
192.168.0.100 255.255.255.0 192.168.0.254 10
netsh interface ip set address "Wireless Connection" static
10.20.30.100 255.0.0.0 10.20.30.254 10
This Microsoft Knowledge Base article has details of the Windows 2000
version of netsh. I don't know how much of it applies to Windows XP:
How to Use the Netsh.exe Tool and Command-Line Switches
http://support.microsoft.com/?id=242468
To run the program, type this at a command prompt:
netsh
Then type "?" or "help" for a list of commands. For information on a
command, type the command name followed by "?" or "help". For example:
diag ?
routing help
--
Best Wishes,
Steve Winograd, MS-MVP (Windows Networking)
Please post any reply as a follow-up message in the news group
for everyone to see. I'm sorry, but I don't answer questions
addressed directly to me in E-mail or news groups.
Microsoft Most Valuable Professional Program
http://mvp.support.microsoft.com