logon router

This topic contains 2 replies, has 2 voices, and was last updated by  Jeffrey Roossien 2 years, 3 months ago.

  • Author
  • #37028

    Jeffrey Roossien

    hello, i need a script that resets my portforward everytime i restart my pc (i dont know why but everytime my pc restarts the portforward resets)
    this is my logon script

    $username = "ziggo"
    $password = "draadloos"
    $router = ""
    $ie = New-Object -com InternetExplorer.Application
    while($ie.ReadyState -ne 4) {start-sleep -m 100}
    start-sleep -s 3

    $ie.Document.getElementsByName('loginUsername').value = '$username'

    $ie.Document.getElementsByName('Password').value = '$password'


    i changed getElementsByName part to nearly everything i can come up with, no succes

    logon site html: https://www.dropbox.com/s/zlak6auqbdey5lb/view-source_192.168.178.1.html?dl=0

  • #37031

    Don Jones

    You're using single quotation marks. That means $username and $password will be passed as literals. If you use double quotes, the variables will be replaced with their contents.

  • #37056

    Jeffrey Roossien

    didnt really matter since it didnt even fill it in, but thanks anyways.
    heres a screenshot of powershell (too lazy to cut out rest, sorry)
    and yes i edited 'loginusername' with double quotes, still no success

You must be logged in to reply to this topic.