Sign in to follow this  
Followers 0
Piyush

configure tcp/ip

6 posts in this topic

I just wanted to know that is there any way of configuring the ip address, subnet mask,default gateway, dns servers with autoit....

Thanks... :)


[font="Comic Sans MS"][size="7"]Piyush.....[/size][/font][font="Palatino Linotype"][size="2"]Some Of My Scripts...Cool Font Generator Train Searcher and Tracer[/size][/font]

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I just wanted to know that is there any way of configuring the ip address, subnet mask,default gateway, dns servers with autoit....

Thanks... :)

$AdapterName = "Local Area Connection"
$IP = "192.168.2.11"
$NetMask = "255.255.255.0"
$DefaultGateway = "192.168.2.1"
$DNS = "208.67.222.222"

ShellExecute("netsh",'interface ip set address name="' & $AdapterName & '" static ' & $IP & ' ' & $NetMask & ' ' & $DefaultGateway)
ShellExecute("netsh",'interface ip set dns ' & $AdapterName & ' static ' & $DNS)

:)

Edited by BinaryBrother

Share this post


Link to post
Share on other sites

$AdapterName = "Local Area Connection"
$IP = "192.168.2.11"
$NetMask = "255.255.255.0"
$DefaultGateway = "192.168.2.1"
$DNS = "208.67.222.222"

ShellExecute("netsh",'interface ip set address name="' & $AdapterName & '" static ' & $IP & ' ' & $NetMask & ' ' & $DefaultGateway)
ShellExecute("netsh",'interface ip set dns ' & $AdapterName & ' static ' & $DNS)

:)

thanks bro for this, i also need to know how to set the secondary dns server

[font="Comic Sans MS"][size="7"]Piyush.....[/size][/font][font="Palatino Linotype"][size="2"]Some Of My Scripts...Cool Font Generator Train Searcher and Tracer[/size][/font]

Share this post


Link to post
Share on other sites

$AdapterName = "Local Area Connection"
$IP = "192.168.2.11"
$NetMask = "255.255.255.0"
$DefaultGateway = "192.168.2.1"
$DNS = "208.67.222.222"
$DNS1 = "208.67.222.223"

ShellExecute("netsh",'interface ip set address name="' & $AdapterName & '" static ' & $IP & ' ' & $NetMask & ' ' & $DefaultGateway)
ShellExecute("netsh",'interface ip set dns ' & $AdapterName & ' static ' & $DNS)
ShellExecute("netsh",'interface ip add dns ' & $AdapterName & $DNS1)



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

$AdapterName = "Local Area Connection"
$IP = "192.168.2.11"
$NetMask = "255.255.255.0"
$DefaultGateway = "192.168.2.1"
$DNS = "208.67.222.222"
$DNS1 = "208.67.222.223"

ShellExecute("netsh",'interface ip set address name="' & $AdapterName & '" static ' & $IP & ' ' & $NetMask & ' ' & $DefaultGateway)
ShellExecute("netsh",'interface ip set dns ' & $AdapterName & ' static ' & $DNS)
ShellExecute("netsh",'interface ip add dns ' & $AdapterName & $DNS1)

THANK YOU TO ALL OF YOU

$AdapterName = "Local Area Connection"
$IP = "192.168.2.11"
$NetMask = "255.255.255.0"
$DefaultGateway = "192.168.2.1"
$DNS = "208.67.222.222"
$DNS1 = "208.67.222.223"

ShellExecute("netsh",'interface ip set address name="' & $AdapterName & '" static ' & $IP & ' ' & $NetMask & ' ' & $DefaultGateway)
ShellExecute("netsh",'interface ip set dns ' & $AdapterName & ' static ' & $DNS)
ShellExecute("netsh",'interface ip add dns ' & $AdapterName & $DNS1)

THANK YOU TO ALL OF YOU

[font="Comic Sans MS"][size="7"]Piyush.....[/size][/font][font="Palatino Linotype"][size="2"]Some Of My Scripts...Cool Font Generator Train Searcher and Tracer[/size][/font]

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