Friday, August 20, 2010

Batch file and shortcut to change ip addresses easily

Put something like the following into a batch file and run it with administrator rights:

netsh interface ip set address "Local Area Connection" static 192.168.1.45
netsh interface ip set address "Local Area Connection 2" static 192.168.1.236

or

netsh interface ip set address "Local Area Connection" dhcp
netsh interface ip set address "Local Area Connection 2" dhcp

and

make a shortcut to the batch files that has administrator rights. In windows 7 :

(administrator rights - properties->shortcut->advanced->administrator)

No comments:

Post a Comment