Sign in to follow this  
Followers 0
Eru

Change TCP/IP Settings via AutoIt Script

2 posts in this topic

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:

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  
Followers 0