How to Auto Login to website (Gmail, Yahoo) using vbs (VB Script)

There are a number of ways to login automatically to a website. Here I am writing this post to login into Gmail and Yahoo account.

How will you auto login into your Gmail & Yahoo account? It’s not as hard as it sounds but you will have to change some details like username & password in below mentioned code.

Auto Login

Just follow below steps to auto login to Gmail & Yahoo.

Step-1: Open a notepad and paste below mentioned code in it and save it gmail.vbs and yahoo.vbs.

You are free to choose any other name which you like most but it is familiar and you will not get confused.

Step-2: Copy below mentioned script in notepad to auto login into G-mail account.

On Error Resume Next

Const PAGE_LOADED = 4

Set objIE = CreateObject("InternetExplorer.Application")

Call objIE.Navigate("http://www.gmail.com")

objIE.Visible = True

Do Until objIE.ReadyState = PAGE_LOADED : Call WScript.Sleep(100) : Loop

objIE.Document.all.Email.Value = "your_username"

objIE.Document.all.Passwd.Value = "Your_Password"

If Err.Number <> 0 Then

msgbox "Error: " & err.Description

End If

Call objIE.Document.all.gaia_loginform.submit

Set objIE = Nothing

Step-3: Copy below mentioned script in notepad to auto login into Yahoo account.


On Error Resume Next

Const PAGE_LOADED = 4

Set objIE = CreateObject("InternetExplorer.Application")

Call objIE.Navigate("http://www.yahoomail.com")

objIE.Visible = True

Do Until objIE.ReadyState = PAGE_LOADED : Call WScript.Sleep(100) : Loop

objIE.Document.all.username.Value = " your_username "

objIE.Document.all.Passwd.Value = " Your_Password "

If Err.Number <> 0 Then

msgbox "Error: " & err.Description

End If

Call objIE.Document.all.login_form.submit

Set objIE = Nothing

You have to just change your username and password.

After saving it as .vbs, connect to the internet and double click on gmail.vbs or yahoo.vbs file.

It will automatically login into your Gmail and Yahoo account.

Don’t forget to write comment in below comment box, if you like it.



Get Free Blogging Tips & Technology updates in your Email !!!

Subscribe via RSS feed

The following two tabs change content below.
Anil Verma
IT Blogger Tips focus on Blogging Tips, SEO Tips, Social Media, SQL Tips, PL/SQL Tips, Oracle DBA, Linux/Unix, Latest Technology, How Tos and Technical Solutions. You can find us on Facebook | Twitter |
Find on Google+

Siteground SALE
60% OFF SiteGround WordPress Hosting – $3.95/month (Exclusive Offer !!!)