Jump to content

configure tcp/ip


Recommended Posts

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

SIGNATURE_0X800007D NOT FOUND

Link to comment
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]

Link to comment
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)


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

Link to comment
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]

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...