Piyush Posted July 8, 2009 Share Posted July 8, 2009 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] Link to comment Share on other sites More sharing options...
BinaryBrother Posted July 8, 2009 Share Posted July 8, 2009 (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 July 8, 2009 by BinaryBrother SIGNATURE_0X800007D NOT FOUND Link to comment Share on other sites More sharing options...
Piyush Posted July 8, 2009 Author Share Posted July 8, 2009 $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 More sharing options...
BigDod Posted July 8, 2009 Share Posted July 8, 2009 $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 More sharing options...
BinaryBrother Posted July 8, 2009 Share Posted July 8, 2009 BigDod said it... SIGNATURE_0X800007D NOT FOUND Link to comment Share on other sites More sharing options...
Piyush Posted July 9, 2009 Author Share Posted July 9, 2009 $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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now