Jump to content

Change TCP/IP Settings via AutoIt Script


Eru
 Share

Recommended Posts

What functions should I look at to change the settings of my TCP/IP settings via a script?

My situation is this:

I have a laptop and my router at home uses static IP addresses, but when I take my laptop to the coffee shop or school where they use DHCP, I have to change it manually, and then change it back when I get home.

It takes like 10 seconds to do and I may be being lazy, but I'd like to make a program that will change my TCP/IP settings from automatic configuration to manual config, and vice versa.

Thanks! :whistle:

Link to comment
Share on other sites

%windir%\system32\netsh.exe interface ip set address name="Local Area Connection" source=dhcp

Create a shortcut on your desktop, that^ one, will set your adapter to DHCP for automatic addressing,

the next one will change it to a static IP. these are just statements that will work inside of a batch file, or straight from a run dialog box, they use the netsh program that comes with windows XP (not sure of other versions of windows).

c:\windows\system32\netsh.exe interface ip set address name="Local Area Connection" static 192.168.0.1 255.255.255.0

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...