#include ;Script executes the following steps below to update routers ISP ;1. Enter router IP address in browser ;2. Assumes default admin account used and updates router password only ;3. Sends enter Key ;4. Accesses the "Internet Setup" link via hyperlink ;5. Enables the checkbox under WAN Setup ;6. Clicks the "Edit" button ;7. Updates Username ;8. Updates Password ;9. Clicks "Next" button ;10. Clicks "Apply" button ;11. Clicks "Logout" link ;12. Closes browser session ;Update router IP address $oIE = _IECreate ("10.0.0.2") _IELoadWait($oIE,0) Sleep(500) $HWND = _IEPropertyGet($oIE, "hwnd") WinSetState($HWND, "", @SW_MAXIMIZE) _IELoadWait($oIE,0) Sleep(500) $oIECollection = _IEFormGetCollection($oIE, 0) ;Default admin account used. I've just updated the password field. Update code with router password. $oPasswordField = _IEFormElementGetObjByName($oIECollection, 'password') _IEFormElementSetValue($oPasswordField, "admin") _IELoadWait($oIE,0) Sleep(500) Send("{ENTER}") _IELoadWait($oIE,0) Sleep(500) ;Update the code below with the hyperlink for "Internet Setup" _IENavigate($oIE, "http://10.0.0.2/setup_wancfg.html") Sleep(500) $oForm = _IEFormGetObjByName($oIE, 0) $oCheckbox = _IEFormElementGetObjByName($oForm, "rml"); $oCheckbox.checked = True _IELoadWait($oIE,0) Sleep(500) $oEditButton = _IEGetObjById($oIE, "editWancfg") _IEAction($oEditButton, "click") _IELoadWait($oIE,0) Sleep(500) ;Updates the username field. Update code with your ISP Username $oPPPUsername = _IEGetObjByName($oIE, "pppUserName") _IEFormElementSetValue($oPPPUsername, "izakkrige@afrihost.co.za") _IELoadWait($oIE,0) Sleep(500) ;Updates the password field. Update code with your ISP Password $oPPPPassword = _IEGetObjByName($oIE, "pppPassword") _IEFormElementSetValue($oPPPPassword, "Afri2014") ;Updates the 2nd password field. Update code with your ISP Password $oconPPPPass = _IEGetObjByName($oIE, "conpppPass") _IEFormElementSetValue($oconPPPPass, "Afri2014") _IELoadWait($oIE,0) Sleep(500) $oNextButton = _IEGetObjById($oIE, "btnNext") _IEAction($oNextButton, "click") _IELoadWait($oIE,0) Sleep(500) $oApplyButton = _IEGetObjByName($oIE, "btnSave") _IEAction($oApplyButton, "click") _IELoadWait($oIE,0) Sleep(500) Local $sMyString = "Logout" Local $oLinks = _IELinkGetCollection($oIE) For $oLink In $oLinks Local $sLinkText = _IEPropertyGet($oLink, "innerText") If StringInStr($sLinkText, $sMyString) Then _IEAction($oLink, "click") ExitLoop EndIf Next _IELoadWait($oIE,0) Sleep(500) _IEQuit($oIE)