how to auto logon my intra website ?

Aug 13 2010 3:28 AM

i want to auto logon my intra website , the problem is that every time i logon a website , i have to input username&passwd, so i want someone can give me a resolution. the following article which i found in the internet maybe a good answer, but i have no idea about how to run the wscript, can anyone give me some advice?
WScript.Quit Main

Function Main
  Set IE = WScript.CreateObject("InternetExplorer.Application", "IE_")
  IE.Visible = True
  IE.Navigate "http://www.google.com/mail"
  Wait IE
  With IE.Document
    .getElementByID("Email").value = "[email protected]"
    .getElementByID("Passwd").value = "Your Password"
    .getElementByID("gaia_loginform").submit
  End With
End Function

Sub Wait(IE)
  Do
    WScript.Sleep 500
  Loop While IE.ReadyState < 4 And IE.Busy
  Do
    WScript.Sleep 500
  Loop While IE.ReadyState < 4 And IE.Busy
End Sub

Sub IE_OnQuit
  On Error Resume Next
  WScript.StdErr.WriteLine "IE closed before script finished."
  WScript.Quit
End Sub

Answers (1)