none
How to AutoLogin using VBScript

    Question

  • <html>
    <head>
    <script type="text/vbscript">
    sub test()

    strLink= "https://apps.genscape.com/NAPowerRT/"
    Set objIExplorer = CreateObject("InternetExplorer.Application")
    objIExplorer.visible = True
    objIExplorer.navigate strLink
    Set WshShell = WScript.CreateObject("WScript.Shell")


    WshShell.SendKeys "UserName"
    WScript.Sleep 100
    WshShell.SendKeys "{TAB}"
    WScript.Sleep(100)

    WshShell.SendKeys "Password"
    WScript.Sleep 100
    WshShell.SendKeys "{TAB}"
    WScript.Sleep 100
    WshShell.SendKeys "{TAB}"
    WScript.Sleep 100

    WshShell.SendKeys "{ENTER}"

    Set objIExplorer = Nothing
    Set WshShell = Nothing
    end sub
    </script>
    </head>
    <body onload="vbscript:test()">
    </body>
    </html>

     

     

    But it is not login, it displays only login page any body can help me for this one

    • Moved by Liliane Teng Tuesday, June 21, 2011 8:10 AM (From:Visual Basic General)
    Monday, June 20, 2011 5:00 AM

Answers

  • But it is not login, it displays only login page any body can help me for this one

    Sorry but this is not really possible due to security restrictions.

    Yu can use ther WebClient under either VBScript or PowerShell to do a login to FTP and HTTP sites that support it nut most user sites use proprietary login methods,

     

    Perhaps if you would explain what site you need to login to someone may have a solution.

    Here is a link to one kind of solution.  It works on some sites.

    http://gallery.technet.microsoft.com/scriptcenter/9d66f3bd-a051-4b0f-833c-868de0f0b653

    Most sites that use logins an jave the credetials saved in Windows although some companies block this with Group Policy so it may not work.

     


    jv
    Tuesday, June 21, 2011 10:00 AM

All replies