whiteball Posted October 26, 2006 Share Posted October 26, 2006 Hello pls help me i have primitive way of doing it Send("{lwindown}r{lwinup}") WinWaitActive("Run") Send("control panel{enter}") WinWaitActive("Control Panel") Send("network") Send("{enter}") WinWaitActive("Network Connections") ;~ MsgBox(0,"","don") Send("local") Send("{enter}") WinWaitActive("Local Area Connection Status") Send("!p") WinWaitActive("Local Area Connection Properties") Send("internet") Send("!r") WinWaitActive("Internet Protocol (TCP/IP) Properties") Send("!s") Send("{tab}") Send(GUICtrlRead($TextBoxIP)) Send("{tab}") Send(GUICtrlRead($TextBoxSubnet)) Send("{tab}") Send(GUICtrlRead($TextBoxGateWay)) Send("{tab}") Send("{tab}") Send(GUICtrlRead($TextBoxDNSPrim)) Send("{tab}") Send(GUICtrlRead($TextBoxDNSSec)) Send("{enter}") WinWaitActive("Local Area Connection Properties") Send("!{F4}") WinWaitActive("Local Area Connection Status") Send("!c") ;~ MsgBox(64, "Network Setup Complete", "The Network Properties was Changed Successfully", 2) WinWaitActive("Network Connections") Send("!{F4}") Link to comment Share on other sites More sharing options...
arcker Posted October 26, 2006 Share Posted October 26, 2006 Hello pls help me i have primitive way of doing it Send("{lwindown}r{lwinup}") WinWaitActive("Run") Send("control panel{enter}") WinWaitActive("Control Panel") Send("network") Send("{enter}") WinWaitActive("Network Connections") ;~ MsgBox(0,"","don") Send("local") Send("{enter}") WinWaitActive("Local Area Connection Status") Send("!p") WinWaitActive("Local Area Connection Properties") Send("internet") Send("!r") WinWaitActive("Internet Protocol (TCP/IP) Properties") Send("!s") Send("{tab}") Send(GUICtrlRead($TextBoxIP)) Send("{tab}") Send(GUICtrlRead($TextBoxSubnet)) Send("{tab}") Send(GUICtrlRead($TextBoxGateWay)) Send("{tab}") Send("{tab}") Send(GUICtrlRead($TextBoxDNSPrim)) Send("{tab}") Send(GUICtrlRead($TextBoxDNSSec)) Send("{enter}") WinWaitActive("Local Area Connection Properties") Send("!{F4}") WinWaitActive("Local Area Connection Status") Send("!c") ;~ MsgBox(64, "Network Setup Complete", "The Network Properties was Changed Successfully", 2) WinWaitActive("Network Connections") Send("!{F4}") maybe in posting in the right section of the forum (in this case Support) , you could have some help -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list] Link to comment Share on other sites More sharing options...
whiteball Posted October 26, 2006 Author Share Posted October 26, 2006 maybe in posting in the right section of the forum (in this case Support) , you could have some helpsorry !! just wast concentrating Link to comment Share on other sites More sharing options...
sulfurious Posted October 26, 2006 Share Posted October 26, 2006 Have a look at netsh make a batch file with this for spawning command line help file @echo off start hh.exe ms-its:ntcmds.chm::/ntcmds.htm Exit Sul Link to comment Share on other sites More sharing options...
BasicOs Posted October 26, 2006 Share Posted October 26, 2006 (edited) not the right forum but if you want that I posted mine tuned and qip, scripts, look at my signature Attention, they were made for vers 3.1. Two scripts one for winnt_xp and another one for win98, they work fine. tested. if you do not want to update to the 3.2 look for the older compiler, thanks. Edited October 26, 2006 by BasicOs Autoit.es - Foro Autoit en Español Word visitors Image Clustrmap image: - Football Spanish team - Spanish team: Casillas, Iniesta, Villa, Xavi, Puyol, Campdevilla, etc..Programando en Autoit+Html - Coding Autoit-Html - Arranca programas desde Internet - Preprocesador de Autoit a http Link to comment Share on other sites More sharing options...
tonym89 Posted December 8, 2006 Share Posted December 8, 2006 (edited) Here is one I made for some of our offices. I borrowed some of the code from some of the other scripts/scraps available here, but thru in my own gui and other functionality Be sure to input your own IP's and what not ------------------------------------------------------------- ;-------------------------------------------------------------------------------------------------- ; AutoIt Version: 3.0 ; Language: English ; Author: Tony ; Script Title: CR IP Navigator ;-------------------------------------------------------------------------------------------------- #Include <process.au3> #include <GuiConstants.au3> Sleep(1000) FileInstall("C:\cr.jpg", @WindowsDir & "\cr.jpg", 1) GUICreate("IP NAVIGATOR 1.00", 270, 315) GUISetBkColor(0x627B9E) $n = GUICtrlCreatePic (@WindowsDir & "\cr.jpg", -1, -1, 270, 75) $ANS = GUICtrlCreateButton("Anson", 30, 100, 35, 20) $LMC = GUICtrlCreateButton("LMC", 30, 140, 35, 20) $DHCP = GUICtrlCreateButton("DHCP", 30, 180, 35, 20) $ADM = GUICtrlCreateButton("Override", 15, 255, 47, 20) $QUI = GUICtrlCreateButton("Exit", 15, 287, 47, 25) GUICtrlCreateLabel ("Selecting the button of the Office Location you desire will auto adjust the TCP/IP settings for you.", 135, 100, 120, 120) GUICtrlCreateLabel ("Office Location", 11, 75, 100, 20) GUICtrlSetFont (-1,9, 400, 4) GUICtrlCreateLabel ("Directions", 160, 75, 70, 20) GUICtrlSetFont (-1,9, 400, 4) GUICtrlCreateLabel ("TMSoftware 2003-2006", 145, 297, 120, 75) GUISetState(@SW_SHOW) $bLoop = 1 While $bLoop = 1 $input = GUIGetMsg() If @error = 1 Then MsgBox(16, "IP Navigator 1.00", "An Error has Occurred") Exit Else If $input = $ANS Then MsgBox(64, "IP NAVIGATOR 1.00", "Network will be configured for Anson and Exit when complete. NOTE that this could take upto 30 Seconds.") Sleep(1000) _RunDOS("netsh inter ip set address local static 10.x.x.x 255.255.255.0 10.x.x.x 1") _RunDOS("netsh inter ip set dns ""Local Area Connection"" static 10.x.x.x") _RunDOS("netsh inter ip add dns ""Local Area Connection"" 10.x.x.x index=2") _RunDOS("netsh inter ip set wins ""Local Area Connection"" static 10.x.x.x") ExitLoop ElseIf $input = $LMC Then MsgBox(64, "IP NAVIGATOR 1.00", "Network will be configured for LMC and Exit when complete. NOTE that this could take upto 30 Seconds.") Sleep(1000) _RunDOS("netsh inter ip set address local static 10.x.x.x 255.255.255.0 10.x.x.x 1") _RunDOS("netsh inter ip set dns ""Local Area Connection"" static 10.x.x.x") _RunDOS("netsh inter ip add dns ""Local Area Connection"" 10.x.x.x index=2") _RunDOS("netsh inter ip set wins ""Local Area Connection"" static 10.x.x.x") ExitLoop ElseIf $input = $DHCP Then MsgBox(64, "IP NAVIGATOR 1.00", "Network will be configured for DHCP and Exit when complete. NOTE that this could take upto 30 Seconds.") Sleep(1000) _RunDOS("netsh inter ip set address local source=dhcp") _RunDOS("netsh inter ip set dns ""Local Area Connection"" source=dhcp") _RunDOS("netsh inter ip set wins ""Local Area Connection"" source=dhcp") ExitLoop ElseIf $input = $QUI Then Sleep( 500 ) FileDelete (@WindowsDir & "\cr.jpg") ExitLoop Exit If $input = $GUI_EVENT_CLOSE Then ExitLoop ContinueLoop EndIf EndIf Wend Exit Edited December 8, 2006 by tonym89 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